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 3087-datafile-newest-filter
- Loading branch information
Showing
12 changed files
with
274 additions
and
10 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
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,97 @@ | ||
# sprint-106-summary | ||
|
||
8/14/202 - 8/27/2024 | ||
|
||
### <mark style="color:orange;">Priority Setting</mark> | ||
|
||
* Reparsing   | ||
* Reasoning: OFA has ability to reparse and the data process with latest system logic which will enable STTs to get error reports that are meaningful and relevant and OFA gets the needed data. System, as a whole, will be more flexible with data flow (able to hot fix and hit reparse). Additionally, we want to avoid missing data and be able to repopulate the database after cleaning the data.   | ||
* Data Access Strategy  | ||
* Reasoning: Creating daily blockers   | ||
* Admin Console Improvements  | ||
* Reasoning: Trigger has been met to refine tickets (Research Synthesis) | ||
* Improved Dev Tooling  | ||
* improve test\_parse.py 2641  | ||
* separate celery 2592  | ||
* Reasoning: Developing / refining tickets to support the above priorities – These tickets will enhance capabilities while the above are being flushed out   | ||
|
||
### <mark style="color:orange;">Sprint Goal</mark> | ||
|
||
**Dev:** | ||
|
||
_**Reparsing, Admin Console Improvements, Application Health Monitoring work, and Improved Dev Tooling**_ | ||
|
||
* \#2965 — As tech lead, I want a database seed implemented for testing | ||
* \#3102 — Admin Exp: Django Implement Multi-Select Fiscal Period Dropdown For Data Export  | ||
* \#2561 — As a sys admin, I need TDP to automatically deactivate accounts that are inactive for 180 days | ||
* \#3110 — Spike - Investigate Custom Filter Integration | ||
* \#3137 — \[bug] OFA unable to export data to csv by record type and fiscal period | ||
* \#3074 — TDP Data Files page permissions for DIGIT & Sys Admin user groups | ||
* \#3076 — Admin Filter Enhancements for Data Files Page  | ||
|
||
**DevOps:** | ||
|
||
_**Successful deployments across environments and pipeline stability investments**_ | ||
|
||
* | ||
|
||
**Design:** | ||
|
||
_**Support reviews, In-app banner to support parsed data, Continue Error Audit (Cat 4)**_ | ||
|
||
* \#2968 — \[Design Deliverable] Update Error Audit for Cat 4 / QA | ||
* \#3114 — \[Design Spike] In-app banner for submission history pages w/ data parsed before May 2024 | ||
* \#3143 — August release notes — Knowledge Center & Email Template | ||
|
||
|
||
|
||
## Tickets | ||
|
||
### Completed/Merged | ||
|
||
* [#2985 \[Design Deliverable\] Email spec for Admin Notification for stuck files](https://app.zenhub.com/workspaces/sprint-board-5f18ab06dfd91c000f7e682e/issues/gh/raft-tech/tanf-app/2985) | ||
* [#2996 Add dynamic field name to cat4 error messages](https://app.zenhub.com/workspaces/sprint-board-5f18ab06dfd91c000f7e682e/issues/gh/raft-tech/tanf-app/2996) | ||
* [#3143 August release notes — Knowledge Center & Email Template](https://app.zenhub.com/workspaces/sprint-board-5f18ab06dfd91c000f7e682e/issues/gh/raft-tech/tanf-app/3143) | ||
* [#3061 \[a11y fix\] Django multi-select filter ](https://app.zenhub.com/workspaces/sprint-board-5f18ab06dfd91c000f7e682e/issues/gh/raft-tech/tanf-app/3061) | ||
* [#2954 Extend SESSION\_COOKIE\_AGE](https://app.zenhub.com/workspaces/sprint-board-5f18ab06dfd91c000f7e682e/issues/gh/raft-tech/tanf-app/2954) | ||
* [#3079 DB Backup Script Fix](https://app.zenhub.com/workspaces/sprint-board-5f18ab06dfd91c000f7e682e/issues/gh/raft-tech/tanf-app/3079) | ||
|
||
### Submitted (QASP Review, OCIO Review) | ||
|
||
* [#3064 Re-parse Meta Model](https://app.zenhub.com/workspaces/sprint-board-5f18ab06dfd91c000f7e682e/issues/gh/raft-tech/tanf-app/3064) | ||
* [#3065 Spike - Guarantee Sequential Execution of Re-parse Command](https://app.zenhub.com/workspaces/sprint-board-5f18ab06dfd91c000f7e682e/issues/gh/raft-tech/tanf-app/3065) | ||
* [#2792 \[Error Audit\] Category 3 error messages clean-up](https://app.zenhub.com/workspaces/sprint-board-5f18ab06dfd91c000f7e682e/issues/gh/raft-tech/tanf-app/2792) | ||
* [#2883 Pre-Made Reporting Dashboards on Kibana](https://app.zenhub.com/workspaces/sprint-board-5f18ab06dfd91c000f7e682e/issues/gh/raft-tech/tanf-app/2883) | ||
* [#2561 As a sys admin, I need TDP to automatically deactivate accounts that are inactive for 180 days](https://app.zenhub.com/workspaces/sprint-board-5f18ab06dfd91c000f7e682e/issues/gh/raft-tech/tanf-app/2561) | ||
* [#3078 \[Research Synthesis\] DIGIT Admin Experience Improvements](https://app.zenhub.com/workspaces/sprint-board-5f18ab06dfd91c000f7e682e/issues/gh/raft-tech/tanf-app/3078) | ||
|
||
### Ready to Merge | ||
|
||
### Closed (Not Merged) | ||
|
||
* [#3147 S3 buckets contain fewer datafiles than DAC](https://app.zenhub.com/workspaces/sprint-board-5f18ab06dfd91c000f7e682e/issues/gh/raft-tech/tanf-app/3147) | ||
|
||
### Moved to Next Sprint  | ||
|
||
**In Progress**  | ||
|
||
* [#2965 As tech lead, I want a database seed implemented for testing](https://app.zenhub.com/workspaces/sprint-board-5f18ab06dfd91c000f7e682e/issues/gh/raft-tech/tanf-app/2965) | ||
* [#2458 Integrate Nexus into CircleCI](https://app.zenhub.com/workspaces/sprint-board-5f18ab06dfd91c000f7e682e/issues/gh/raft-tech/tanf-app/2458) | ||
* [#3137 \[bug\] OFA unable to export data to csv by record type and fiscal period](https://app.zenhub.com/workspaces/sprint-board-5f18ab06dfd91c000f7e682e/issues/gh/raft-tech/tanf-app/3137) | ||
* [#2968 \[Design Deliverable\] Update Error Audit for Cat 4 / QA](https://app.zenhub.com/workspaces/sprint-board-5f18ab06dfd91c000f7e682e/issues/gh/raft-tech/tanf-app/2968) | ||
* [#3060 As a TDP user, I need to stay logged in when I'm actively using the system](https://app.zenhub.com/workspaces/sprint-board-5f18ab06dfd91c000f7e682e/issues/gh/raft-tech/tanf-app/3060) | ||
* [#3074 TDP Data Files page permissions for DIGIT & Sys Admin user groups](https://app.zenhub.com/workspaces/sprint-board-5f18ab06dfd91c000f7e682e/issues/gh/raft-tech/tanf-app/3074) | ||
* [#3114 \[Design Spike\] In-app banner for submission history pages w/ data parsed before May 2024](https://app.zenhub.com/workspaces/sprint-board-5f18ab06dfd91c000f7e682e/issues/gh/raft-tech/tanf-app/3114) | ||
* [#3142 \[Research Spike\] Get more detail about Yun & DIGIT's data workflow and use cases](https://app.zenhub.com/workspaces/sprint-board-5f18ab06dfd91c000f7e682e/issues/gh/raft-tech/tanf-app/3142) | ||
|
||
#### Blocked | ||
|
||
* | ||
|
||
**Raft Review** | ||
|
||
* [#3043 Sentry: Local environment for Debugging](https://app.zenhub.com/workspaces/sprint-board-5f18ab06dfd91c000f7e682e/issues/gh/raft-tech/tanf-app/3043) | ||
* [#3110 Spike - Investigate Custom Filter Integration](https://app.zenhub.com/workspaces/sprint-board-5f18ab06dfd91c000f7e682e/issues/gh/raft-tech/tanf-app/3110) | ||
* [#3102 Admin Exp: Django Implement Multi-Select Fiscal Period Dropdown For Data Export ](https://app.zenhub.com/workspaces/sprint-board-5f18ab06dfd91c000f7e682e/issues/gh/raft-tech/tanf-app/3102) | ||
* [#3087 Admin By Newest Filter Enhancements for Data Files Page](https://app.zenhub.com/workspaces/sprint-board-5f18ab06dfd91c000f7e682e/issues/gh/raft-tech/tanf-app/3087) | ||
* [#3076 Admin Filter Enhancements for Data Files Page ](https://app.zenhub.com/workspaces/sprint-board-5f18ab06dfd91c000f7e682e/issues/gh/raft-tech/tanf-app/3076) |
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
35 changes: 35 additions & 0 deletions
35
tdrs-backend/tdpservice/email/helpers/admin_notifications.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,35 @@ | ||
"""helper functions to administer user accounts.""" | ||
|
||
def email_admin_deactivated_user(user): | ||
"""Send an email to OFA Admins when a user is deactivated.""" | ||
from tdpservice.users.models import User | ||
from tdpservice.email.email_enums import EmailType | ||
from tdpservice.email.email import automated_email, log | ||
from tdpservice.email.tasks import get_ofa_admin_user_emails | ||
|
||
recipient_emails = get_ofa_admin_user_emails() | ||
logger_context = { | ||
'user_id': user.id, | ||
'object_id': user.id, | ||
'object_repr': user.username, | ||
'content_type': User, | ||
} | ||
|
||
template_path = EmailType.ACCOUNT_DEACTIVATED_ADMIN.value | ||
text_message = 'A user account has been deactivated.' | ||
subject = ' TDP User Account Deactivated due to Inactivity' | ||
context = { | ||
'user': user, | ||
} | ||
|
||
log(f"Preparing email to OFA Admins for deactivated user {user.username}", logger_context=logger_context) | ||
|
||
for recipient_email in recipient_emails: | ||
automated_email( | ||
email_path=template_path, | ||
recipient_email=recipient_email, | ||
subject=subject, | ||
email_context=context, | ||
text_message=text_message, | ||
logger_context=logger_context | ||
) |
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
18 changes: 18 additions & 0 deletions
18
tdrs-backend/tdpservice/email/templates/account-deactivated-admin.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,18 @@ | ||
{% extends 'base.html' %} | ||
{% block content %} | ||
<!-- Body copy --> | ||
<p style="color: #000000;"> | ||
|
||
<p>The following user account for the TANF Data Portal (TDP) has been deactivated.</p> | ||
|
||
<p>Account Information:</p> | ||
<ul> | ||
<li>Name: {{ user.first_name }}</li> | ||
<li>Last name: {{ user.last_name }}</li> | ||
<li>Email: {{ user.email }}</li> | ||
</ul> | ||
|
||
<p>Thank you,</p> | ||
TDP Team | ||
</p> | ||
{% endblock %} |
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
58 changes: 58 additions & 0 deletions
58
tdrs-backend/tdpservice/users/migrations/0041_users_digit_group_add_datafile_permission.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,58 @@ | ||
# Generated by Django 3.2.5 on 2021-08-16 14:10 | ||
from django.contrib.auth.models import Group | ||
from django.db import migrations | ||
|
||
from tdpservice.users.permissions import ( | ||
add_permissions_q, | ||
get_permission_ids_for_model, | ||
view_permissions_q | ||
) | ||
|
||
|
||
def set_digit_team_permissions(apps, schema_editor): | ||
"""Set relevant Group Permissions for DIGIT Team group.""" | ||
digit = ( | ||
apps.get_model('auth', 'Group').objects.get(name='DIGIT Team') | ||
) | ||
|
||
stt_permissions = get_permission_ids_for_model( | ||
'stts', | ||
'stt', | ||
filters=[view_permissions_q] | ||
) | ||
|
||
|
||
datafile_permissions = get_permission_ids_for_model( | ||
'data_files', | ||
'datafile', | ||
filters=[view_permissions_q, add_permissions_q] | ||
) | ||
|
||
# Assign model permissions | ||
digit.permissions.add(*datafile_permissions, *stt_permissions) | ||
|
||
def unset_digit_team_permissions(apps, schema_editor): | ||
"""Remove all Group Permissions added to DIGIT Team.""" | ||
digit = ( | ||
apps.get_model('auth', 'Group').objects.get(name='DIGIT Team') | ||
) | ||
datafile_permissions = get_permission_ids_for_model( | ||
'data_files', | ||
'datafile', | ||
filters=[view_permissions_q, add_permissions_q] | ||
) | ||
digit.permissions.remove(*datafile_permissions) | ||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
('auth', '__latest__'), | ||
('users', '0040_users_digit_group_permissions'), | ||
] | ||
|
||
operations = [ | ||
migrations.RunPython( | ||
set_digit_team_permissions, | ||
reverse_code=unset_digit_team_permissions | ||
) | ||
] |
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