Rename references/instances of 'months'

Description

As an implementer, I don't want to see references to months since OpenLMIS supports calculations based off of periods.

  • Requisition Service (also fix demo data and JSON schemas for these)

    • RequisitionLineItem.maxMonthsOfStock (and references in LineItemFieldsCalculator and LineItemFieldsCalculatorTest)

    • ApprovedProductDto.maxMonthsOfStock

    • ProductDto.maxMonthsOfStock and dosesPerMonth

    • RequisitionLineItemDto.maxMonthsOfStock

    • Javadoc for LineItemFieldsCalculator.calculateMaximumStockQuantity

    • Bootstrap data and demo data (columns_maps) have string "Average consumption over a specified number of periods/months"

    • BaseWebIntegrationTest has MOCK_SEARCH_APPROVED_PRODUCTS with maxMonthsOfStock

  • Reference Data Service (also fix demo data and JSON schemas for these)

    • FacilityTypeApprovedProduct.maxMonthsOfStock and minMonthsOfStock

    • ProgramProduct.maxMonthsStock should actually be removed because it doesn't make sense here; it makes sense in FacilityTypeApprovedProduct

    • ProgramProduct.dosesPerMonth

    • ProgramProductBuilder.maxMonthsOfStock and dosesPerMonth

    • ApprovedProductDto.maxMonthsOfStock and minMonthsOfStock

    • ProductDto.maxMonthsOfStock and dosesPerMonth

    • Javadoc for ProgramProduct.createNew has maxMonthsStock and dosesPerMonth

  • Fulfillment Service

    • ProgramProductDto.maxMonthsOfStock and dosesPerMonth

Acceptance Criteria

  • For all the places in the code mentioned above:

    • Change maxMonthsOfStock or maxMonthsStock to: maxStock

    • Change minMonthsOfStock to: minStock

    • Change dosesPerMonth to: dosesPerPatient

    • Remove ProgramProduct.maxMonthsStock (and ProgramProductBuilder.maxMonthsOfStock) from code

Attachments

1

QAlity Plus - Test Management

Checklists

Activity

Show:

Chongsun Ahn February 8, 2017 at 9:15 PM

This is probably expected. No one has really done an audit if the RAML is what we want it to be. It looks like some endpoints don't show in the static API docs, but do show in the Swagger API docs (example: /facilities/id/approvedProducts).

Brandon Bowersox-Johnson February 8, 2017 at 8:53 PM

Closing this ticket. The renaming appears to work (when making requisitions in the UI the calculations still work).

FYI, your changes to the RAML see to be fine in the code (and seem to pass all our tests). THat said, your changes in the RAML aren't really visible to developers looking at our static or live/swagger API docs. Screenshot attached shows an example where your change in RAML is in a schema that is not displayed through the API docs UIs. If this is something broken or not what you expected, let's talk. I just wanted to mention it.

Brandon Bowersox-Johnson February 8, 2017 at 12:42 AM

The review looks good to me. We can see if Nick chimes in with any more review feedback. I will be glad to QA this ticket tomorrow.

My QA test plan is:

  • Look at Test or UAT to run through a requisition to make sure these numbers are all still right in the UI (this ticket should not have changed anything in the UI at all, so we want to make sure calculations and labels are all still the same)

  • Spot-check Swagger and JSON for at least one endpoint in each service impacted: Requisition, Ref Data and Fulfillment

Chongsun Ahn February 8, 2017 at 12:34 AM

Done and the reviews have been updated.

Brandon Bowersox-Johnson February 7, 2017 at 11:36 PM

Passing this ticket back to you for the final naming tweak ("maxPeriodsOfStock" and "minPeriodsOfStock") per our discussion on Skype.

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

Details

Assignee

Reporter

Story Points

Components

Sprint

Fix versions

Priority

Time Assistant

Created January 23, 2017 at 10:22 PM
Updated February 9, 2017 at 9:15 PM
Resolved February 8, 2017 at 8:53 PM