Repository navigation
fix: restore experiment safety reviewer emails for proposal status actions - #1902
mutambaraf wants to merge 2 commits into
Conversation
simonfernandes
left a comment
There was a problem hiding this comment.
The change looks fine, but I think the logic between the proposal handler and the experiment handler has diverged and I wonder if it's worth aligning
Experiment handler - Sends the email to users with the ESR role, but fails if the email setting doesn't exist (doesn't make sense)
Proposal handler - Just checks and sends to the email setting
Is it worth making both handlers prefer the setting and falling back to users with the role?
I missed the meeting the other day when I think this was discussed so sorry if it's already been covered.
I think its okay as it is because they are different workflows one is for specifically Experiment Safe and the other is for proposal workflow. The one for proposal sent to only the set email and the other send to the set roles but for it to work there must be an attached work flow to the call. But maybe having different flags in the database. |
Description
This PR restores the functionality to send experiment safety reviewer emails when proposal status actions occur.
Restores the EXPERIMENT_SAFETY_REVIEWERS case in the proposal status action email handler, which was dropped when the handlers were split into proposal and experiment email handler. Since then, proposal workflows set up to email "Experiment Safety" hit the default case: no email went out and nothing was written to the status action log, even with EXPERIMENT_SAFETY_REVIEW_EMAIL set.Emails now go to the EXPERIMENT_SAFETY_REVIEW_EMAIL address, either combined into one email or sent one per proposal with full proposal details, and the result is logged so status action replay works.
Motivation and Context
This change is required to ensure that the Experiment Safety team is kept informed about proposal status changes. This was previously missing, leading to a lack of communication and potential safety risks.
Changes
EXPERIMENT_SAFETY_REVIEWERSis added in the switch statement handling email recipients.How Has This Been Tested?
Fixes Jira Issue
UserOfficeProject/issue-tracker#1747
Depends On
Tests included/Docs Updated?