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

Add notification for updating status of application to AcceptedForSelection #1480

Merged
merged 2 commits into from
May 22, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -979,7 +979,8 @@ private async Task<IEnumerable<string>> GetNotificationsRecipientIds(
&& Enum.TryParse(additionalData[StatusTitle], out ApplicationStatus applicationStatus))
{
if (applicationStatus == ApplicationStatus.Approved
|| applicationStatus == ApplicationStatus.Rejected)
|| applicationStatus == ApplicationStatus.Rejected
|| applicationStatus == ApplicationStatus.AcceptedForSelection)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(Design) Please consider if this check could be extracted and reused as a helper method. Currently there are 2 other places where kind of same set of condition is checked - in ExecuteUpdateAsync() the if wrapping call to SendApplicationUpdateStatusEmail(), and in mentioned SendApplicationUpdateStatusEmail() the switch throwing "unsupported" ArgumentException when condition is not met. Here you've introduced the 3rd place.
If it's not the coincidence and it's expected that logic for all mentioned places should be the same - please make it technically the same and implemented in 1 place.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

{
recipientIds.Add(application.Parent.UserId);
}
Expand Down
Loading