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

Conversation

alrom
Copy link
Contributor

@alrom alrom commented May 14, 2024

@alrom alrom requested review from h4wk13, DmyMi, VadymLevkovskyi and a team May 14, 2024 17:38
@alrom alrom self-assigned this May 14, 2024
Copy link
Contributor

@VadymLevkovskyi VadymLevkovskyi left a comment

Choose a reason for hiding this comment

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

There is small improvement in design (see other comment)
And there are no tests for changed logic!

Comment on lines 981 to 983
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

Copy link

@alrom alrom merged commit cbd8cf7 into develop May 22, 2024
5 checks passed
@alrom alrom deleted the Romanchuk/NotificationForUpdatingStatusOfApplication branch May 22, 2024 20:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

2 participants