Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Email notification for blocked disbursement to ministry only once #3054

Closed
3 of 4 tasks
Joshua-Lakusta opened this issue Mar 28, 2024 · 1 comment
Closed
3 of 4 tasks
Assignees
Labels
Good first issue Good for newcomers Ministry Ministry Features User Story

Comments

@Joshua-Lakusta
Copy link
Collaborator

Joshua-Lakusta commented Mar 28, 2024

As a ministry user I want to receive only one notification email when a student disbursement is blocked. The ministry user wants this as they will create a ticket on each notification and only one notification is necessary.

Acceptance Criteria

  • Modify the process so that the ministry email address only receives this notification one time.

Additional Context

  • linked to ticket 2536
  • Original ticket requested 3x notifications 7 days a part for both student and ministry user. We want to change it so the student still receives the 3x notifications but we would like the ministry to only receive this email once.

Technical Context

  • Seperate the logic for student and Ministry in Reference . In the calling method.
  • Create a generic method to check , if the email notifications are already sent to a particular template and metadata( disbursementId)
  • Existing failing e2e needs to be updated, and create new E2E tests to ensure ministry notification once.
@michesmith michesmith added the Ministry Ministry Features label Apr 4, 2024
@michesmith michesmith added this to the 2.0 Part-Time Students MVP milestone May 3, 2024
@sslaws sslaws added the Business Items under Business Consideration label May 4, 2024
@HRAGANBC HRAGANBC added the Good first issue Good for newcomers label May 7, 2024
@HRAGANBC HRAGANBC added Dev & Architecture Development and Architecture and removed Business Items under Business Consideration labels May 7, 2024
@andrewsignori-aot andrewsignori-aot removed the Dev & Architecture Development and Architecture label May 9, 2024
@Joshua-Lakusta Joshua-Lakusta added the Business Items under Business Consideration label May 29, 2024
@Joshua-Lakusta Joshua-Lakusta added Dev & Architecture Development and Architecture and removed Business Items under Business Consideration labels Dec 17, 2024
@andrewsignori-aot andrewsignori-aot removed the Dev & Architecture Development and Architecture label Dec 24, 2024
@andrewsignori-aot andrewsignori-aot self-assigned this Jan 14, 2025
github-merge-queue bot pushed a commit that referenced this issue Jan 15, 2025
…once (#4245)

- Created a base class for e-Cert notifications (`ECertNotification`)
and segregated the logic to generate blocked notifications into
`MinistryBlockedDisbursementNotification` and
`StudentBlockedDisbursementNotification`.
- Existing logic was moved into the new files.
- Code for the method `shouldCreateNotification` for the Students was
moved and no changes were done for this PR, unless critical no comments
will be addressed.
- `ECertNotification` can be used for any other e-Cert notification as
required, not only blocked disbursement.

_Please note that the student data required to generate the notification
is now retrieved twice in the event that the disbursement is blocked and
the Ministry should be notified for the first time. The benefit of
having the separation between the logic for the different notifications
seems greater than an occasional extra query to the student's table.
Please note that the query was simplified from what it used to be._

_Please also note that the below technical AC was not executed. The
queries have different approaches, sometimes checking the existence,
sometimes requiring a count, and sometimes requiring a count and a date
last sent. I did not see a benefit for this PR. Please share an
opinion/suggestion if needed._
```
Create a generic method to check, if the email notifications are already sent to a particular template and metadata( disbursementId).
```
@andrewsignori-aot
Copy link
Collaborator

andrewsignori-aot commented Jan 17, 2025

@ninosamson I brought the ticket back to in progress to fix a log issue. The indentation is to have it validated and possibility demoed next Monday.

github-merge-queue bot pushed a commit that referenced this issue Jan 17, 2025
…once - Change log hierarchy (#4259)

The blocked notifications logs were using the parent log instead of the
child log some hierarchy was added now as below. This was an existing
issue and it was causing multiple logs from multiple children to be
appended to the same hierarchy.

### Log sample with the new hierarchy
```
INFO: Executing e-Cert calculations for all eligible disbursements.'
INFO: Retrieving eligible disbursements(s).'
INFO: Found 1 eligible disbursement(s) for 1 student(s).'
--INFO: Log details'
--INFO: Processing application number 5906924436, disbursement id 41 scheduled for 2025-01-16.'
----INFO: Log details'
----INFO: Executing e-Cert calculation steps.'
----INFO: Executing step 1 out of 9.'
----INFO: Executing full-time disbursement validations.'
----INFO: Disbursement estimated awards do not contain any amount to be disbursed.'
----INFO: There are no active restriction bypasses.'
----INFO: Checking if blocked disbursement notifications should be generated.'
------INFO: Log details'
------INFO: Ministry Blocked Disbursement notification should not be created at this moment for disbursement ID 41.'
------INFO: Log details'
------INFO: Student Blocked Disbursement notification created for disbursement ID 41.'
--INFO: The step determined that the calculation should be interrupted. This disbursement will not be part of the next e-Cert generation.'
INFO: Sending e-Cert file.'
INFO: Retrieving Full Time disbursements to generate the e-Cert file...'
INFO: Found 0 Full Time disbursements schedules.'
INFO: Creating Full Time e-Cert file content...'
INFO: Uploading Full Time content...'
INFO: Generated file: MSFT-Request\\DPBC.EDU.FTECERTS.20250116.001'
```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Good first issue Good for newcomers Ministry Ministry Features User Story
Projects
None yet
Development

No branches or pull requests

9 participants