-
Notifications
You must be signed in to change notification settings - Fork 84
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
feat(mrf): add static workflow routing #6968
Conversation
src/app/modules/submission/multirespondent-submission/multirespondent-submission.controller.ts
Outdated
Show resolved
Hide resolved
src/app/models/form.server.model.ts
Outdated
message: 'Please provide valid email addresses', | ||
}, | ||
}, | ||
//TODO: add form fields |
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.
What are these form fields to be added?
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.
These form fields refer to the next stage of static routing, where we specify which fields the respondent should fill in. I'll remove it haha (053fd8d), it might be confusing. And whoever works on it next should be able to figure it out anyway!
@@ -365,6 +475,7 @@ export const handleUpdateMultirespondentSubmission = [ | |||
MultirespondentSubmissionMiddleware.createFormsgAndRetrieveForm, | |||
MultirespondentSubmissionMiddleware.scanAndRetrieveAttachments, | |||
// EncryptSubmissionMiddleware.validateStorageSubmission, | |||
MultirespondentSubmissionMiddleware.setCurrentWorkflowStep, |
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.
/nit For discussion, non-blocking
I recall that we have logs disabled for middlewares, i.e., makes debugging difficult
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.
LGTM aside from the question on form fields
Problem
We want to add static routing to MRF
Closes FRM-1577
Solution
This PR allows static routing for steps 2 and 3 of the workflow. It emails the respective respondent when the form has been submitted at each step.
Backend
workflowStep
property to the submission schema.workflow
property to the form schema. This is an array of objects, where each object contains theworkflow_type
andemails
. More properties (e.g. form field IDs) can be added in the future.Frontend
Breaking Changes
Features
Before & After Screenshots
AFTER:
Tests