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

PIMS-1946 Cancel/Stop Notifications #2726

Merged
merged 6 commits into from
Oct 21, 2024

Conversation

dbarkowsky
Copy link
Collaborator

@dbarkowsky dbarkowsky commented Oct 16, 2024

🎯 Summary

PIMS-1946

Tackles two issues with the notifications:

  • Notifications previously queued when a project was cancelled were still being sent.
  • Notifications were being re-sent when a project returned to a previous status.

Changes

  • If a project is cancelled, Pending and Accepted notifications will be cancelled.
  • If a project's status is changed, the notifications are only queued if this status is not in the project's history.

Testing

  • Alter the status of a project in and out of the statuses that queue notifications (Approved for ERP, Submitted)
    • See that repeat notifications should not be queued.
  • Change the agency interest values
    • See that the interest values should be updated still
  • Cancel a project with pending notifications
    • See that those notifications are now cancelled too

🔰 Checklist

  • I have read and agree with the following checklist and am following the guidelines in our Code of Conduct document.
  • I have performed a self-review of my code.
  • I have commented my code, particularly in hard-to-understand areas.
  • I have made corresponding changes to the documentation where required.
  • I have tested my changes to the best of my ability.
  • My changes generate no new warnings.

Copy link

🚀 Deployment Information

The Express API Image has been built with the tag: 2726. Please make sure to utilize this specific tag when promoting these changes to the TEST and PROD environments during the API deployment. For more updates please monitor Image Tags Page on Wiki.

Copy link

codeclimate bot commented Oct 16, 2024

Code Climate has analyzed commit e1466fc and detected 0 issues on this pull request.

The test coverage on the diff in this pull request is 91.6% (50% is the threshold).

This pull request will bring the total coverage in the repository to 93.4%.

View more on Code Climate.

Copy link
Collaborator

@LawrenceLau2020 LawrenceLau2020 left a comment

Choose a reason for hiding this comment

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

Changing a project status back to Submitted and back to Approved for ERP doesn't trigger email notifications anymore 👍
When cancelling a project, I was expecting a notification, but didn't get one for some reason.

@dbarkowsky
Copy link
Collaborator Author

Changing a project status back to Submitted and back to Approved for ERP doesn't trigger email notifications anymore 👍 When cancelling a project, I was expecting a notification, but didn't get one for some reason.

Didn't realize there was a notification for cancelled projects. I've updated the way the notifications are generated a little. It should now still generate regular notifications for the cancellation.

Copy link
Collaborator

@LawrenceLau2020 LawrenceLau2020 left a comment

Choose a reason for hiding this comment

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

Working well now, tested all the statuses that trigger notifications: cancelled, denied, submitted, & ERP statuses all get triggered "one time" if a project hasn't been in that status before.

@dbarkowsky dbarkowsky merged commit 9320dd4 into main Oct 21, 2024
8 checks passed
@dbarkowsky dbarkowsky deleted the PIMS-1946-Cancel/Stop-Notifications branch October 21, 2024 16:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants