-
Notifications
You must be signed in to change notification settings - Fork 3
Feature/ab#29006 failed submission notifications #1399
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
Feature/ab#29006 failed submission notifications #1399
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR extends the intake resync window, enriches the synchronization worker to send summary emails for missing submissions, and adjusts Teams alerts to only fire when there are failures.
- Increased the default lookback from 2 to 4 days in background job settings
- Enhanced
IntakeSyncWorkerto build and send an HTML email when missing submissions are detected - Updated
GetMissingSubmissionsto return both the set of missing IDs and a formatted report, and gated Teams notifications on nonempty results
Reviewed Changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| applications/Unity.GrantManager/src/Unity.GrantManager.Domain/Settings/GrantManagerSettingDefinitionProvider.cs | Changed IntakeResync_NumDaysToCheck default from "-2" to "-4" |
| applications/Unity.GrantManager/src/Unity.GrantManager.Application/Intakes/BackgroundWorkers/IntakeSyncWorker.cs | Injected IEmailNotificationService, added HTML email construction and send logic |
| applications/Unity.GrantManager/src/Unity.GrantManager.Application/ApplicationForms/ApplicationFormSycnronizationService.cs | Altered GetMissingSubmissions to return a (HashSet<string>, string) tuple and only post to Teams when there are missing submissions |
| applications/Unity.GrantManager/src/Unity.GrantManager.Application.Contracts/ApplicationForms/IApplicationFormSycnronizationService.cs | Updated interface signature for GetMissingSubmissions to match new tuple return type |
Comments suppressed due to low confidence (1)
applications/Unity.GrantManager/src/Unity.GrantManager.Application/Intakes/BackgroundWorkers/IntakeSyncWorker.cs:83
- Add unit tests to verify that the email notification path is only executed when there are missing submissions and that the generated HTML content matches expectations.
if (sendEmail) {
| @@ -1,9 +1,11 @@ | |||
| using Microsoft.Extensions.Logging; | |||
| using Quartz; | |||
| using System.Net.Http; | |||
Copilot
AI
Jun 4, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The System.Net.Http import is not used in this file; consider removing it to keep the usings clean.
| using System.Net.Http; |
| } | ||
| } | ||
|
|
||
| emailBodyBuilder.AppendLine("<br> Bests"); |
Copilot
AI
Jun 4, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[nitpick] The closing greeting "Bests" looks like a typo; consider using "Best regards," or simply "Best,".
| emailBodyBuilder.AppendLine("<br> Bests"); | |
| emailBodyBuilder.AppendLine("<br> Best regards,"); |
Added email to already existent intake sync worker, and adjusted teams notification to only send when submissions are missing.