Skip to content

Conversation

@cyrusparsons
Copy link
Contributor

Added email to already existent intake sync worker, and adjusted teams notification to only send when submissions are missing.

Copy link
Contributor

Copilot AI left a 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 IntakeSyncWorker to build and send an HTML email when missing submissions are detected
  • Updated GetMissingSubmissions to 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;
Copy link

Copilot AI Jun 4, 2025

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.

Suggested change
using System.Net.Http;

Copilot uses AI. Check for mistakes.
}
}

emailBodyBuilder.AppendLine("<br> Bests");
Copy link

Copilot AI Jun 4, 2025

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,".

Suggested change
emailBodyBuilder.AppendLine("<br> Bests");
emailBodyBuilder.AppendLine("<br> Best regards,");

Copilot uses AI. Check for mistakes.
@jimmyPasta jimmyPasta merged commit 62b7c5c into dev Jun 4, 2025
5 checks passed
@jimmyPasta jimmyPasta deleted the feature/AB#29006-Failed-Submission-Notifications branch June 4, 2025 23:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants