-
Notifications
You must be signed in to change notification settings - Fork 9
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
BRP-5: Re-route duplicate application requests to separate email address. #769
base: master
Are you sure you want to change the base?
Conversation
…ess. * behaviours/email.js changed to include setSubmissionReference and addSubmissionReference functions to check if report has previously been submitted. * models/email.js updated to include isResubmission property. * email/index.js updated to include switch statement to change between the two mail boxes. * behaviours/email.spec.js and models/email.spec.js updated for unit tests to support the new logic.
@@ -41,7 +41,7 @@ unit_tests: &unit_tests | |||
|
|||
sonar_scanner: &sonar_scanner | |||
pull: if-not-exists | |||
image: quay.io/ukhomeofficedigital/sonar-scanner-node:549b75f593f28da1c4a0a6f79877ec69d3b21037 | |||
image: quay.io/ukhomeofficedigital/sonar-scanner-nodejs:latest |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It’s usually good idea to avoid latest as it will keep updating the image for every deployment to the latest one. Ideally it’ll be good to take a specific sha
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can you give this one a try sha256:dcc00d2581fdca090c171d4ae53d2a49b3a3bbb08a96cdaa4933a041d0ba2a42
@@ -41,7 +41,7 @@ unit_tests: &unit_tests | |||
|
|||
sonar_scanner: &sonar_scanner | |||
pull: if-not-exists |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if it doesn't work just add a comment saying usually good practice is to have a version number a sha pointing to the image because you don't want to grab the latest one in case it gets updated
function errorChecked(key, data) { | ||
if (data[key + '-checkbox']) { | ||
return key; | ||
} | ||
} | ||
|
||
function setSubmissionReference(data) { | ||
// This function is responsible for storing a submission referene if one is required |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
// This function is responsible for storing a submission referene if one is required | |
// This function is responsible for storing a submission reference if one is required |
let recipientEmailAddress = config.email.caseworker[email.template]; | ||
// If it's a resubmission, we should be sending them through to the new duplicate inbox | ||
// Else we continue to send to the original caseworker inbox | ||
let recipientEmailAddress = email.isResubmission ? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should it be a const
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great, well done @SarahJaneLuff for putting all of this together from various other people's work and adding the salt and pepper
o and just some minor things to look at
Changes