From b83416d281b32c9077b5cadb7e59c4b54755ee06 Mon Sep 17 00:00:00 2001
From: Beverly Nguyen
Date: Tue, 7 Oct 2025 13:33:25 -0700
Subject: [PATCH 1/3] Fix "Data available for X days" text disappearing on job
details page
---
app/main/views/jobs.py | 5 +++++
app/templates/partials/jobs/notifications.html | 2 +-
2 files changed, 6 insertions(+), 1 deletion(-)
diff --git a/app/main/views/jobs.py b/app/main/views/jobs.py
index 663717350..367dfbb36 100644
--- a/app/main/views/jobs.py
+++ b/app/main/views/jobs.py
@@ -77,6 +77,11 @@ def view_job(service_id, job_id):
counts=_get_job_counts(job),
notifications=notifications,
more_than_one_page=more_than_one_page,
+ uploaded_file_name=job.original_file_name,
+ time_left=get_time_left(job.created_at),
+ service_data_retention_days=current_service.get_days_of_retention(
+ job.template_type, number_of_days="seven_day"
+ ),
download_link=(
url_for(
".view_job_csv",
diff --git a/app/templates/partials/jobs/notifications.html b/app/templates/partials/jobs/notifications.html
index 46a9c1458..f787b6440 100644
--- a/app/templates/partials/jobs/notifications.html
+++ b/app/templates/partials/jobs/notifications.html
@@ -30,7 +30,7 @@
{% elif notifications and time_left != "Data no longer available" %}
- Download this report (CSV)
+ Download this report (CSV)
{{ time_left }}
From 577a678f0ed713e5d7d12960490a5091c77377d9 Mon Sep 17 00:00:00 2001
From: Beverly Nguyen
Date: Tue, 7 Oct 2025 14:27:32 -0700
Subject: [PATCH 2/3] pytest fix
---
tests/app/main/views/test_jobs.py | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/tests/app/main/views/test_jobs.py b/tests/app/main/views/test_jobs.py
index 603c39624..f3358d582 100644
--- a/tests/app/main/views/test_jobs.py
+++ b/tests/app/main/views/test_jobs.py
@@ -117,6 +117,7 @@ def test_get_jobs_should_tell_user_if_more_than_one_page(
service_one,
mock_get_job,
mock_get_service_template,
+ mock_get_service_data_retention,
):
page = client_request.get(
"main.view_job",
@@ -133,6 +134,7 @@ def test_should_show_job_in_progress(
mock_get_service_template,
mock_get_job_in_progress,
fake_uuid,
+ mock_get_service_data_retention,
):
page = client_request.get(
"main.view_job",
@@ -149,6 +151,7 @@ def test_should_show_job_without_notifications(
mock_get_service_template,
mock_get_job_in_progress,
fake_uuid,
+ mock_get_service_data_retention,
):
page = client_request.get(
"main.view_job",
@@ -164,6 +167,7 @@ def test_should_show_job_with_sending_limit_exceeded_status(
mock_get_service_template,
mock_get_job_with_sending_limits_exceeded,
fake_uuid,
+ mock_get_service_data_retention,
):
page = client_request.get(
"main.view_job",
@@ -224,6 +228,7 @@ def test_should_show_old_job(
processing_started,
expected_message,
active_user_with_permissions,
+ mock_get_service_data_retention,
):
mocker.patch(
"app.job_api_client.get_job",
@@ -254,6 +259,7 @@ def test_should_show_scheduled_job(
mock_get_service_template,
mock_get_scheduled_job,
fake_uuid,
+ mock_get_service_data_retention,
):
page = client_request.get(
"main.view_job",
From 6d84b38b1b245fc26612ca4e17627b72231d8e6e Mon Sep 17 00:00:00 2001
From: Beverly Nguyen
Date: Tue, 7 Oct 2025 14:30:36 -0700
Subject: [PATCH 3/3] css fix
---
app/templates/partials/jobs/notifications.html | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/app/templates/partials/jobs/notifications.html b/app/templates/partials/jobs/notifications.html
index f787b6440..f515af8fa 100644
--- a/app/templates/partials/jobs/notifications.html
+++ b/app/templates/partials/jobs/notifications.html
@@ -31,8 +31,7 @@
{% elif notifications and time_left != "Data no longer available" %}
Download this report (CSV)
-
- {{ time_left }}
+ {{ time_left }}
{% endif %}