Add new requisition template for a program

Description

As an administrator (Adam), I want to be able to add a new requisition template for a program, so that users of my system can create requisitions with different columns.

Deals with adding a new requisition template for a program.

This ticket will need to refactor the POST /requisitionTemplates API to not require an entire template in the request body, but probably a programId (required) and facilityTypeIds (optional) in the request params.

Deleting a requisition template has not been added to this ticket, as it is not clear there's a need for it.

Open question:

  • Should facility types be further filtered by ones already mapped to a template for that program?

Acceptance Criteria

  • A new "Add R&R Template" button at the top right of the R&R Templates section

  • Clicking this button opens a modal (see mockup)

  • This modal requires a name (input, required) and program (dropdown, required), with a way for facility types to be mapped (optional), and it has Cancel and Create buttons at the bottom

  • The facility types dropdown is already filtered by the facility types in the list below it

  • Selecting Cancel goes back to the R&R Templates page

  • Selecting Create will give a validation error if any facility types mapped are already mapped to another template; the error should indicate which facility types are already mapped

  • Selecting Create with no validation errors goes to the Template Columns tab on the edit page

  • The error message regarding missing columns in the requisition template could be improved: Column with name: requestedQuantity is not present in template. --> The column with name: requestedQuantity is not present in the template.

  • Validations from the back-end don't contain column names. This needs to be changed, as e.g. when a given column is missing or can't appear in the template for some reason, the user doesn't know what has to be changed in order for the requisition template to be created.

  • The label of the "skipped" column in the modal could be changed to "Skip".

  • The "Template with the given name already exists" error message could be changed to:
    "A template with a given name already exists".

Attachments

5

QAlity Plus - Test Management

Checklists

Activity

Show:

Joanna Bebak 
June 4, 2018 at 11:55 AM

I made a re-test, and now everything works correctly.

Joanna Bebak 
June 4, 2018 at 6:21 AM
(edited)

I started testing the ticket and noticed one minor issue - when the template's creation fails, the "Failed to save the requisition template" notification looks as if it was a notification of success, not failure - it's green, etc., instead of red.

I finished testing the ticket, and didn't find any other issues. Please fix the above one if possible.

Sebastian Brudziński 
May 24, 2018 at 3:33 PM

To clarify the above - we want to remove the "Requisition columns" part on the add requisition template modal. The new requisition template should contain all available requisition template columns.

Sam Im 
May 23, 2018 at 11:01 PM


Hi everyone. After further discussion for the goal of this ticket and the linked tickets, I now see that I've included some scope creep to this ticket that wasn't intended as the goal. This was designed in the mockup I created here: https://openlmis.mybalsamiq.com/projects/olmis-3929multiplerequisitiontemplateadmin/Create%20requisition%20template, but this mockup is incorrect. It's my fault there was confusion and additional work added to this ticket. The tickets that are added as roadmap will be marked as dead.

If we keep to the acceptance criteria and the original mockup in this ticket, then it is considered done when: clicking create on the modal checks validations for program and facility types, and then directs the user to the existing Configure Template/Template Columns page. Team Parrot will need to reopen this ticket and remove the Requisition Template additions, and will need to retest, and mark the test case created for this validation as dead. Again, I'm so sorry about this extra work to revert back.

FYI

Joanna Bebak 
May 15, 2018 at 7:14 AM

As for #1, #8, #10 - OK, I see. I checked, and #2 and #7 have been fixed. I will move others to and create a separate ticket for #6. As all issues related to this ticket are fixed, I will close it.

Done
Pinned fields
Click on the next to a field label to start pinning.

Details

Assignee

Reporter

Story Points

Original estimate

Time tracking

2w 1d 4h logged

Components

Sprint

Fix versions

Priority

Time Assistant

Created January 24, 2018 at 10:24 PM
Updated November 29, 2020 at 1:03 PM
Resolved June 4, 2018 at 11:55 AM