Versions Compared
Key
- This line was added.
- This line was removed.
- Formatting was changed.
User Story Description:
Anchor | ||||
---|---|---|---|---|
|
As an Admin I want to be able to allow file submissions for a given form.
Business Rationale:
In some use cases data is aggregated by an intermediary user (e.g. Health Authority) and submitting each dataset individually is not feasible/realistic.
(In the future it can be explored if this intermediary is not required).
Priority: Must Have
Dependencies:
[List potential dependencies with other User Stories or Tasks]
# | Task or User Story | Type of Dependency | ||
1 | As an Admin I want to access the same functionalities as Reviewer | Parent | ||
2 |
|
| ||
3 |
|
| ||
4 |
|
|
Technical Details
:Custom feature.:
First create a migration file for Knex to add a new column to allow a form to upload file contain this code :
Code Block | ||
---|---|---|
| ||
exports.up = function (knex) {
return Promise.resolve()
.then(() => knex.schema.alterTable('form', table => {
table.boolean('allowSubmitterToUploadFile').notNullable().defaultTo(false).comment('This parameter allow submitter to load data from csv file');
}));
};
exports.down = function (knex) {
return Promise.resolve()
.then(() => knex.schema.alterTable('form', table => {
table.dropColumn('allowSubmitterToUploadFile');
}));
};
|
After run this command
Code Block | ||
---|---|---|
| ||
npm run migrate |
Edit the form model to add the new field “allowSubmitterToUploadFile”.
go to the form service in the create function add this line :
Code Block |
---|
obj.allowSubmitterToUploadFile = data.allowSubmitterToUploadFile; |
before this line
Code Block |
---|
await Form.query(trx).insert(obj); |
Acceptance Criteria:
[List the Acceptance Criteria]
# | Description | Notes |
1 | As a form designer I am able to check/uncheck the box “Enable File Submissions for this form“ in the Form Functionality section of the Form settings |
|
2 | The setting is saved in the database |
|
3 |
|
|
4 |
|
|
5 |
|
|
Prototype/Mockups
Provide high fidelity prototype or mockup
Out of Scope:
Building the logic to parse the file or generate the template is not part of this story
Contact(s):
Table of Contents
Table of Contents | ||||
---|---|---|---|---|
|