817: Rename column headers/attributes

Test Case #:817

 

Test Case Name: Rename column headers/attributes

System: openLMIS

Subsystem: requisition

Test case designed by: Lucyna Kwidzinska

Design Date:10.08.2016

Short description

Possibility to rename the column header labels to be displayed on the requisition template so that data entry staff understand what information is being requested, each implementer may call each attribute by a different label.

Acceptance Criteria:

  • administrators can enter new text names for each header/attribute
  • defined names display on the requisition template
  • Alphanumeric string is accepted
  • no character limit exits

                                                                                                                                                   

Pre – conditions:

                                                                                                                                                                                                                                                       

 

 

Step

Action

Expected system response

Comment

1

Create program

URL: http://localhost:8080/api/programs/?access_token=7df6fb9c-c137-44fc-9186-99065bc3bcbd

Method: POST

Example body:

{

"code": "programcode",

"name": "programname",

"periodsSkippable": "true"

}



                                                                                                      
         status: 201 created is returned,  

program id: "http://localhost:8080/api/programs/99af6907-af1a-4727-aea9-f11e02441a91"

                                                                          
                                                 

2

Create RequisitionTemplate

URL: http://localhost:8080/api/requisitionTemplates/?access_token=7df6fb9c-c137-44fc-9186-99065bc3bcbd

Method: POST

Example body:

{

"program": "http://localhost:8080/api/programs/99af6907-af1a-4727-aea9-f11e02441a91",

"columnsMap":{

"columnKey":

{ "name":"testname",

"label":"testlabel", "displayOrder":"3",

"isDisplayed": true,

"isDisplayRequired": true,

"canChangeOrder": true,

"canChangedByUser": true,

"source":"REFERENCE_DATA" }

}

}

 

 

3

Edit 'label' value in RequisitionTemplate.

URL:  http://localhost:8080/api/requisitionTemplates/?access_token=3cce5b43-7bb4-4f9b-b7eb-dd9b59f47151

Method: POST

Example body:

{
    "id": "98ee161a-93ff-4a6c-9444-ccb7ce4d1183",
    "program": "http://localhost:8080/api/programs/99af6907-af1a-4727-aea9-f11e02441a91",
    "columnsMap":{
        "columnKey":
        {   "name":"testname",
            "label":"abclabeltestestestestestest",
            "displayOrder":"3",
            "isDisplayed": true,
            "isDisplayRequired": true,
            "canChangeOrder": true,
            "canChangedByUser": true,
            "source":"REFERENCE_DATA" }
        }
}

The value in label attribute has been modified successfully.

 

4

  

 

5

   

6

  

 

7

  

 

8

                                                 

 

 

 

Post – conditions:

OpenLMIS: the global initiative for powerful LMIS software