diff --git a/src/registrar/assets/js/get-gov-admin.js b/src/registrar/assets/js/get-gov-admin.js index 68e7829a9..cdbbc83ee 100644 --- a/src/registrar/assets/js/get-gov-admin.js +++ b/src/registrar/assets/js/get-gov-admin.js @@ -284,6 +284,10 @@ function enableRelatedWidgetButtons(changeLink, deleteLink, viewLink, elementPk, // Get the current date in the format YYYY-MM-DD var currentDate = new Date().toISOString().split('T')[0]; + + // Default the value of the start date input field to the current date + let startDateInput =document.getElementById('start'); + startDateInput.value = currentDate; // Default the value of the end date input field to the current date let endDateInput =document.getElementById('end'); @@ -294,7 +298,7 @@ function enableRelatedWidgetButtons(changeLink, deleteLink, viewLink, elementPk, if (exportGrowthReportButton) { exportGrowthReportButton.addEventListener('click', function() { // Get the selected start and end dates - let startDate = document.getElementById('start').value; + let startDate = startDateInput.value; let endDate = endDateInput.value; let exportUrl = document.getElementById('exportLink').dataset.exportUrl; diff --git a/src/registrar/tests/test_reports.py b/src/registrar/tests/test_reports.py index 23cc2caf8..c55d776cc 100644 --- a/src/registrar/tests/test_reports.py +++ b/src/registrar/tests/test_reports.py @@ -382,10 +382,10 @@ class ExportDataTest(TestCase): "Domain name,Domain type,Agency,Organization name,City,State,AO," "AO email,Submitter,Submitter title,Submitter email,Submitter phone," "Security contact email,Status\n" - "adomain10.gov,Federal,Armed Forces Retirement Home,ready\n" - "adomain2.gov,Interstate,dnsneeded\n" - "cdomain1.gov,Federal - Executive,World War I Centennial Commission,ready\n" - "ddomain3.gov,Federal,Armed Forces Retirement Home,onhold\n" + "adomain10.gov,Federal,Armed Forces Retirement Home,Ready\n" + "adomain2.gov,Interstate,Dns needed\n" + "cdomain1.gov,Federal - Executive,World War I Centennial Commission,Ready\n" + "ddomain3.gov,Federal,Armed Forces Retirement Home,On hold\n" ) # Normalize line endings and remove commas, @@ -524,11 +524,11 @@ class ExportDataTest(TestCase): expected_content = ( "Domain name,Domain type,Agency,Organization name,City," "State,Status,Expiration date\n" - "cdomain1.gov,Federal-Executive,World War I Centennial Commission,,,,ready,\n" - "adomain10.gov,Federal,Armed Forces Retirement Home,,,,ready,\n" - "zdomain9.gov,Federal,Armed Forces Retirement Home,,,,deleted,\n" - "sdomain8.gov,Federal,Armed Forces Retirement Home,,,,deleted,\n" - "xdomain7.gov,Federal,Armed Forces Retirement Home,,,,deleted,\n" + "cdomain1.gov,Federal-Executive,World War I Centennial Commission,,,,Ready,\n" + "adomain10.gov,Federal,Armed Forces Retirement Home,,,,Ready,\n" + "zdomain9.gov,Federal,Armed Forces Retirement Home,,,,Deleted,\n" + "sdomain8.gov,Federal,Armed Forces Retirement Home,,,,Deleted,\n" + "xdomain7.gov,Federal,Armed Forces Retirement Home,,,,Deleted,\n" ) # Normalize line endings and remove commas, diff --git a/src/registrar/utility/csv_export.py b/src/registrar/utility/csv_export.py index dad9e94c8..9e8739a94 100644 --- a/src/registrar/utility/csv_export.py +++ b/src/registrar/utility/csv_export.py @@ -38,7 +38,7 @@ def write_row(writer, columns, domain_info): "AO": ao, "AO email": domain_info.authorizing_official.email if domain_info.authorizing_official else " ", "Security contact email": security_contacts[0].email if security_contacts else " ", - "Status": domain_info.domain.state, + "Status": domain_info.domain.get_state_display(), "Expiration date": domain_info.domain.expiration_date, "Created at": domain_info.domain.created_at, "First ready at": domain_info.domain.first_ready_at,