Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

User Story Description:
Anchor
top
top

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

top page

Dependencies:

top page

[List potential dependencies with other User Stories or Tasks]

#

Task or User Story

Type of Dependency

1

2

 

 

3

 

 

4

 

 

Technical Details:

First create a migration file for Knex to add a new column to allow a form to upload file contain this code :

Code Block
languagejs

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
languagebash
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:

top page

[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

top page

Provide high fidelity prototype or mockup

Out of Scope:

top page

  • Building the logic to parse the file or generate the template is not part of this story

Contact(s):

top page

Table of Contents

Table of Contents
minLevel1
maxLevel7