forked from HHS/TANF-app
-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'develop' into 1621-descriptive-error-message-page-authe…
…ntication-source-unavailable
- Loading branch information
Showing
18 changed files
with
1,664 additions
and
274 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,87 @@ | ||
# sprint-101-summary | ||
|
||
6/5/2024 - 6/18/2024 | ||
|
||
**Dev:** | ||
|
||
_**Prioritized DAC and Notifications Work**_  | ||
|
||
* As sys admin, I want to be able to reparse datafile sets #2978 | ||
* As a software engineer, I want to be able to test django-admin-508 #3008 | ||
* As tech lead, I need the STT filter for search\_indexes to be updated #2950 | ||
* As a data analyst I want to be notified of approaching data deadlines #2473 | ||
* add `SENDGRID_API_KEY` to deploy.backend.sh #2677 | ||
* Implement (small) data lifecycle (backup/archive ES) #3004 | ||
* As a developer I want to test django-508 repo #2980\ | ||
|
||
|
||
**DevOps:** | ||
|
||
_**Successful deployments across environments and pipeline stability investments**_ | ||
|
||
* Application health monitoring #831 | ||
|
||
**Design:** | ||
|
||
_**Close out error guide work, coordinate with dev on a plan for Cat 3 problems introduced by Cat 2 work, support spec-writing for upcoming work, and continued error audit dev ticket refinement.**_ | ||
|
||
* Error Report Guide #2847 is going through final edits  | ||
* Walk-on Dear Colleague letter link update to this PR (or spin up a separate ticket if deployment of the letter to OFA's website doesn't align to this) | ||
* Deliver spec for #3014 (Blanked-out values in Submission History) | ||
* \#3021 Updated KC Release Notes & Update Indicator FAQ - stretch goal for this sprint | ||
* Write follow-on / spec tickets from #2909 findings - stretch/ongoing lift | ||
* Category 3 error messages clean-up #2792 - stretch/ongoing lift | ||
|
||
## Tickets | ||
|
||
### Completed/Merged | ||
|
||
* [#2980 As a developer I want to test django-508 repo](https://app.zenhub.com/workspaces/sprint-board-5f18ab06dfd91c000f7e682e/issues/gh/raft-tech/tanf-app/2980) | ||
* [#2892 Correct misleading error message for unaligned reporting year/q against header year/q](https://app.zenhub.com/workspaces/sprint-board-5f18ab06dfd91c000f7e682e/issues/gh/raft-tech/tanf-app/2892) | ||
* [#2909 \[Research Spike\] OOtB OFA Kibana Experience & DIGIT Data Access](https://app.zenhub.com/workspaces/sprint-board-5f18ab06dfd91c000f7e682e/issues/gh/raft-tech/tanf-app/2909) | ||
* [#2991 As tech lead, I need the sftp file transfer feature to be deprecated](https://app.zenhub.com/workspaces/sprint-board-5f18ab06dfd91c000f7e682e/issues/gh/raft-tech/tanf-app/2991) | ||
* [#2847 \[Design Deliverable\] Error Report Knowledge Center Explainer](https://app.zenhub.com/workspaces/sprint-board-5f18ab06dfd91c000f7e682e/issues/gh/raft-tech/tanf-app/2847) | ||
* [#3024 2897 follow-on for a11y-related enhancement ](https://app.zenhub.com/workspaces/sprint-board-5f18ab06dfd91c000f7e682e/issues/gh/raft-tech/tanf-app/3024) | ||
* [#2897 As a data analyst I want finalized language and guidance resources in Submission History & Error Reports ](https://app.zenhub.com/workspaces/sprint-board-5f18ab06dfd91c000f7e682e/issues/gh/raft-tech/tanf-app/2897) | ||
|
||
### Submitted (QASP Review, OCIO Review) | ||
|
||
* [#2133 \[Dev\] Enhancement for Request Access form (Tribe discoverability) ](https://app.zenhub.com/workspaces/sprint-board-5f18ab06dfd91c000f7e682e/issues/gh/raft-tech/tanf-app/2133) | ||
* [#3023 as STT approved user, I need my IP address whitelisted so i can access TDP](https://app.zenhub.com/workspaces/sprint-board-5f18ab06dfd91c000f7e682e/issues/gh/raft-tech/tanf-app/3023) | ||
* [#3000 \[Design Deliverable\] TDP Poster for summer 2024 conferences](https://app.zenhub.com/workspaces/sprint-board-5f18ab06dfd91c000f7e682e/issues/gh/raft-tech/tanf-app/3000) | ||
* [#2795 As tech lead, I need TDP to detect duplicate records within a file and not store them in the db. ](https://app.zenhub.com/workspaces/sprint-board-5f18ab06dfd91c000f7e682e/issues/gh/raft-tech/tanf-app/2795) | ||
* [#2693 \[Error Audit\] Category 2 error messages clean-up ](https://app.zenhub.com/workspaces/sprint-board-5f18ab06dfd91c000f7e682e/issues/gh/raft-tech/tanf-app/2693) | ||
* [#2801 Friendly name cleanup ](https://app.zenhub.com/workspaces/sprint-board-5f18ab06dfd91c000f7e682e/issues/gh/raft-tech/tanf-app/2801) | ||
* [#2883 Pre-Made Reporting Dashboards on Kibana](https://app.zenhub.com/workspaces/sprint-board-5f18ab06dfd91c000f7e682e/issues/gh/raft-tech/tanf-app/2883) | ||
* [#3021 \[Design Deliverable\] Updated KC Release Notes & Update Indicator FAQ](https://app.zenhub.com/workspaces/sprint-board-5f18ab06dfd91c000f7e682e/issues/gh/raft-tech/tanf-app/3021) | ||
* [#2954 Extend SESSION\_COOKIE\_AGE](https://app.zenhub.com/workspaces/sprint-board-5f18ab06dfd91c000f7e682e/issues/gh/raft-tech/tanf-app/2954) | ||
|
||
### Ready to Merge | ||
|
||
* | ||
|
||
### Closed (Not Merged) | ||
|
||
* [#2491 Create root-level docker-compose configuration file(s)](https://app.zenhub.com/workspaces/sprint-board-5f18ab06dfd91c000f7e682e/issues/gh/raft-tech/tanf-app/2491) | ||
* [#1690 As a system admin, I need a way to be redirected to frontend from DAC](https://app.zenhub.com/workspaces/sprint-board-5f18ab06dfd91c000f7e682e/issues/gh/raft-tech/tanf-app/1690) | ||
* [#2351 As a user I want to be notified when the files are being scanned or uploaded when I push upload button](https://app.zenhub.com/workspaces/sprint-board-5f18ab06dfd91c000f7e682e/issues/gh/raft-tech/tanf-app/2351) | ||
* [#2591 Allow `manage.py` commands to be run by circleci](https://app.zenhub.com/workspaces/sprint-board-5f18ab06dfd91c000f7e682e/issues/gh/raft-tech/tanf-app/2591) | ||
|
||
### Moved to Next Sprint  | ||
|
||
**In Progress**  | ||
|
||
* [#3004 Implement (small) data lifecycle (backup/archive ES)](https://app.zenhub.com/workspaces/sprint-board-5f18ab06dfd91c000f7e682e/issues/gh/raft-tech/tanf-app/3004) | ||
* [#831 \[Spike\] As a Tech Lead, I want to get alerts when there is a backend or frontend error that affects an STT user ](https://app.zenhub.com/workspaces/sprint-board-5f18ab06dfd91c000f7e682e/issues/gh/raft-tech/tanf-app/831) | ||
* [#2978 As sys admin, I want to be able to reparse datafile sets](https://app.zenhub.com/workspaces/sprint-board-5f18ab06dfd91c000f7e682e/issues/gh/raft-tech/tanf-app/2978) | ||
|
||
#### Blocked | ||
|
||
* | ||
|
||
**Raft Review** | ||
|
||
* [#2950 As tech lead, I need the STT filter for search\_indexes to be updated ](https://app.zenhub.com/workspaces/sprint-board-5f18ab06dfd91c000f7e682e/issues/gh/raft-tech/tanf-app/2950) | ||
* [#3008 As a software engineer, I want to be able to test django-admin-508](https://app.zenhub.com/workspaces/sprint-board-5f18ab06dfd91c000f7e682e/issues/gh/raft-tech/tanf-app/3008) | ||
* [#3016 Spike - Cat2 Validator Improvement](https://app.zenhub.com/workspaces/sprint-board-5f18ab06dfd91c000f7e682e/issues/gh/raft-tech/tanf-app/3016) | ||
* [#2473 As a data analyst I want to be notified of approaching data deadlines](https://app.zenhub.com/workspaces/sprint-board-5f18ab06dfd91c000f7e682e/issues/gh/raft-tech/tanf-app/2473) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
27 changes: 27 additions & 0 deletions
27
tdrs-backend/tdpservice/email/templates/upcoming-submission-deadline.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
{% extends 'base.html' %} | ||
{% block content %} | ||
|
||
<!-- Body copy --> | ||
<p>Hello {{ first_name }},</p> | ||
<p>This is a friendly reminder that your data files are due in 5 days. </p> | ||
<p>Please sign in to the <a href="{{ url }}" target="_blank">TANF Data Portal</a> | ||
to upload and submit data files for <b>Fiscal Year {{ fiscal_year }} - {{ fiscal_quarter}}</b> by <b>{{ submission_deadline }}.</b></p> | ||
|
||
<!-- This link uses descriptive text to inform the user what will happen with the link is tapped. --> | ||
<!-- It also uses inline styles since some email clients won't render embedded styles from the head. --> | ||
<!-- <a href="" style="color: #336a90; text-decoration: underline;">Reset your password now</a> --> | ||
<p><a class="button" href="{{ url }}" style="background-color:#336a90;border-radius:4px;color:#ffffff;display:inline-block;font-family:sans-serif;font-size:18px;font-weight:bold;line-height:60px;text-align:center;text-decoration:none;width: auto; padding-left: 24px; padding-right: 24px;-webkit-text-size-adjust:none;">Submit your data files</a></p> | ||
|
||
<b>Need help?</b><br> | ||
We're here for you! Check out the <a href="http://tdp-project-updates.app.cloud.gov/knowledge-center/" target="_blank">TDP Knowledge Center</a> for specific gudiance on <a href="https://tdp-project-updates.app.cloud.gov/knowledge-center/uploading-data.html" target="_blank">Submitting Data Files</a> and <a href="https://tdp-project-updates.app.cloud.gov/knowledge-center/faq.html">Frequently Asked Questions</a>. | ||
<p> | ||
TDP is now the only method for data submissions; you should not be submitting data through SFTP or Cyberfusion. Please reach out to the TDP support team at <a href="mailto:[email protected]" target="_blank">[email protected]</a> if you have any questions or need assistance. | ||
<p>Thank you,</p> | ||
<p>The TDP Team</p> | ||
|
||
|
||
<!-- This link uses descriptive text to inform the user what will happen with the link is tapped. --> | ||
<!-- It also uses inline styles since some email clients won't render embedded styles from the head. --> | ||
<!-- <a href="" style="color: #336a90; text-decoration: underline;">Reset your password now</a> --> | ||
|
||
{% endblock %} |
134 changes: 134 additions & 0 deletions
134
tdrs-backend/tdpservice/email/test/test_upcoming_deadline_email.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,134 @@ | ||
"""Test function for sending upcoming data deadline reminders.""" | ||
import pytest | ||
from datetime import datetime | ||
from django.core import mail | ||
from tdpservice.email.tasks import send_data_submission_reminder | ||
from django.contrib.auth.models import Group | ||
from tdpservice.stts.models import STT | ||
from tdpservice.users.models import User | ||
from tdpservice.data_files.models import DataFile | ||
|
||
|
||
@pytest.mark.parametrize('due_date, reporting_period, fiscal_quarter', [ | ||
('February 14', 'Oct - Dec', 'Q1'), | ||
('May 15th', 'Jan - Mar', 'Q2'), | ||
('August 14th', 'Apr - Jun', 'Q3'), | ||
('November 14th', 'Jul - Sep', 'Q4'), | ||
]) | ||
@pytest.mark.django_db | ||
def test_upcoming_deadline_sends_no_sections_submitted( | ||
due_date, reporting_period, fiscal_quarter): | ||
"""Test that the send_deactivation_warning_email function runs when no sections have been submitted.""" | ||
stt = STT.objects.create( | ||
name='Arkansas', | ||
filenames={ | ||
"Active Case Data": "test-filename.txt", | ||
"Closed Case Data": "test-filename-closed.txt", | ||
} | ||
) | ||
|
||
data_analyst = User.objects.create( | ||
username='[email protected]', | ||
stt=stt, | ||
account_approval_status='Approved' | ||
) | ||
data_analyst.groups.add(Group.objects.get(name='Data Analyst')) | ||
data_analyst.save() | ||
|
||
send_data_submission_reminder(due_date, reporting_period, fiscal_quarter) | ||
|
||
assert len(mail.outbox) == 1 | ||
assert mail.outbox[0].subject == "Action Requested: Please submit your TANF data files" | ||
|
||
|
||
@pytest.mark.parametrize('due_date, reporting_period, fiscal_quarter', [ | ||
('February 14', 'Oct - Dec', 'Q1'), | ||
('May 15th', 'Jan - Mar', 'Q2'), | ||
('August 14th', 'Apr - Jun', 'Q3'), | ||
('November 14th', 'Jul - Sep', 'Q4'), | ||
]) | ||
@pytest.mark.django_db | ||
def test_upcoming_deadline_sends_some_sections_submitted( | ||
due_date, reporting_period, fiscal_quarter): | ||
"""Test that the send_deactivation_warning_email function runs when some sections have been submitted.""" | ||
stt = STT.objects.create( | ||
name='Arkansas', | ||
filenames={ | ||
"Active Case Data": "test-filename.txt", | ||
"Closed Case Data": "test-filename-closed.txt", | ||
} | ||
) | ||
|
||
data_analyst = User.objects.create( | ||
username='[email protected]', | ||
stt=stt, | ||
account_approval_status='Approved' | ||
) | ||
data_analyst.groups.add(Group.objects.get(name='Data Analyst')) | ||
data_analyst.save() | ||
|
||
now = datetime.now() | ||
fiscal_year = now.year - 1 if fiscal_quarter == 'Q1' else now.year | ||
|
||
_ = DataFile.create_new_version({ | ||
"section": 'Active Case Data', | ||
"quarter": fiscal_quarter, | ||
"year": fiscal_year, | ||
"stt": stt, | ||
"user": data_analyst, | ||
}) | ||
|
||
send_data_submission_reminder(due_date, reporting_period, fiscal_quarter) | ||
|
||
assert len(mail.outbox) == 1 | ||
assert mail.outbox[0].subject == "Action Requested: Please submit your TANF data files" | ||
|
||
|
||
@pytest.mark.parametrize('due_date, reporting_period, fiscal_quarter', [ | ||
('February 14', 'Oct - Dec', 'Q1'), | ||
('May 15th', 'Jan - Mar', 'Q2'), | ||
('August 14th', 'Apr - Jun', 'Q3'), | ||
('November 14th', 'Jul - Sep', 'Q4'), | ||
]) | ||
@pytest.mark.django_db | ||
def test_upcoming_deadline_no_send_when_all_sections_complete( | ||
due_date, reporting_period, fiscal_quarter): | ||
"""Test that the send_deactivation_warning_email function does not run when all sections have been submitted.""" | ||
stt = STT.objects.create( | ||
name='Arkansas', | ||
filenames={ | ||
"Active Case Data": "test-filename.txt", | ||
"Closed Case Data": "test-filename-closed.txt", | ||
} | ||
) | ||
|
||
data_analyst = User.objects.create( | ||
username='[email protected]', | ||
stt=stt, | ||
account_approval_status='Approved' | ||
) | ||
data_analyst.groups.add(Group.objects.get(name='Data Analyst')) | ||
data_analyst.save() | ||
|
||
now = datetime.now() | ||
fiscal_year = now.year - 1 if fiscal_quarter == 'Q1' else now.year | ||
|
||
_ = DataFile.create_new_version({ | ||
"section": 'Active Case Data', | ||
"quarter": fiscal_quarter, | ||
"year": fiscal_year, | ||
"stt": stt, | ||
"user": data_analyst, | ||
}) | ||
|
||
_ = DataFile.create_new_version({ | ||
"section": 'Closed Case Data', | ||
"quarter": fiscal_quarter, | ||
"year": fiscal_year, | ||
"stt": stt, | ||
"user": data_analyst, | ||
}) | ||
|
||
send_data_submission_reminder(due_date, reporting_period, fiscal_quarter) | ||
|
||
assert len(mail.outbox) == 0 |
Oops, something went wrong.