feat: add technique proposal rejection comment - #1703
Open
ellen-wright wants to merge 26 commits into
Open
Conversation
…ffice-core into 1533-add-technique-proposal-rejection-comment
ellen-wright
requested review from
William-Edwards-STFC
and removed request for
a team
August 3, 2026 10:46
ellen-wright
marked this pull request as draft
August 3, 2026 10:46
…://github.com/UserOfficeProject/user-office-core into 1533-add-technique-proposal-rejection-comment
ellen-wright
marked this pull request as ready for review
August 4, 2026 07:17
mutambaraf
reviewed
Aug 5, 2026
Comment on lines
+671
to
+672
| // Do you want to add a comment | ||
| console.log('HEREEEEEEE!!!!!!!!!!'); |
Contributor
There was a problem hiding this comment.
We may need to remove this.
| proposalTemplate: recipientWithData.proposalTemplate, | ||
| samples: recipientWithData.samples, | ||
| hazards: recipientWithData.hazards, | ||
| rejectionComment: recipientWithData, |
Contributor
There was a problem hiding this comment.
We need to pass rejectionComment only here
Contributor
There was a problem hiding this comment.
Suggested change
| rejectionComment: recipientWithData, | |
| rejectionComment: recipientWithData.rejectionComment, |
| .getProposalRejectionComment(proposalPk) | ||
| .catch((error) => { | ||
| return rejection( | ||
| `Could not get proposal scientist comment proposal: '${proposalPk}'`, |
Contributor
There was a problem hiding this comment.
We might wan to say Could not get proposal rejection comment
Comment on lines
+390
to
+398
| if (value === StatusCode.UNSUCCESSFUL && comment != '') { | ||
| api({ | ||
| toastSuccessMessage: | ||
| 'Proposal rejection comment successfully created', | ||
| }).createProposalRejectionComment({ | ||
| proposalPk: unsuccessfullPK, | ||
| comment: comment ?? '', | ||
| }); | ||
| } |
Contributor
There was a problem hiding this comment.
Here if updateProposalStatus fails we may need to skip updating the comment.
jekabs-karklins
requested changes
Aug 6, 2026
| proposalTemplate: recipientWithData.proposalTemplate, | ||
| samples: recipientWithData.samples, | ||
| hazards: recipientWithData.hazards, | ||
| rejectionComment: recipientWithData, |
Contributor
There was a problem hiding this comment.
Suggested change
| rejectionComment: recipientWithData, | |
| rejectionComment: recipientWithData.rejectionComment, |
…://github.com/UserOfficeProject/user-office-core into 1533-add-technique-proposal-rejection-comment
jekabs-karklins
approved these changes
Aug 17, 2026
jekabs-karklins
left a comment
Contributor
There was a problem hiding this comment.
looks good form my side
mutambaraf
reviewed
Aug 18, 2026
| .should('not.exist'); | ||
| }); | ||
|
|
||
| it('Scientist should be able to add a rejection comment when changing status to unsuccessful', function () { |
Contributor
There was a problem hiding this comment.
I’m also aware that User Officers may be able to make these changes. Is it worth confirming whether this is actually the case? If so, we should add a test to cover that scenario as well.
…://github.com/UserOfficeProject/user-office-core into 1533-add-technique-proposal-rejection-comment
mutambaraf
approved these changes
Aug 24, 2026
yoganandaness
removed their request for review
August 28, 2026 09:13
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
refs: UserOfficeProject/issue-tracker#1533
Motivation and Context
Experiment Scientists would like to add a comment to emails when setting status to unsuccessful to explain their reasoning. Currently someone will reach out separately after this so this will give the user extra information on the proposal decision.
This PR allows a comment tot be given once the status of a technique proposal is set to 'Unsuccessful'.
Changes
Tests included/Docs Updated?