OLMIS-3885 Add version to orderables

Activity

FEOLMIS-3252 5

Keyboard shortcuts  
  • Summarize the review outcomes (optional)
     
    #permalink

    Details

    Warning: no files are visible, they have all been filtered.
    Participant Role Time Spent Comments Latest Comment
    Author 19m 3 Not currently in the APIs. So reference data is still at ...
    Reviewer - Complete 33m    
    Reviewer - Complete 20m 2 Missing changelog. Do I feel like this is a breaking change?
    Reviewer - 0% reviewed      
    Reviewer - Complete 17m    
    Total   1h 29m 5  
    #permalink

    Objectives

    • Review db migration (versionid and lastupdated)
    • Review orderable with composite primary key (id and version id) b/c of foreign key constraints (from orderable_identifiers, program_orderables, facility_type_approved_products), called OrderableIdentity
      • This required Orderable to not extend BaseEntity anymore
    • New Orderable constructor that made more sense than AllArgsConstructor
    • Orderable DTO now has meta field with versionId and lastUpdated
      • Implemented equals to compare all fields, including meta fields (lastUpdated is compared by instant)
    • Review queries modified to get latest orderable, also a query that gets a specific version of orderable
    • GET /api/orderables/id now supports versionId
    • Review added versionId to demo data

    Branches in review

    #permalink

    Issues Raised From Comments

    Key Summary State Assignee
    #permalink

    General Comments

    Chongsun Ahn

    Note that there is no logic here for incrementing versionId when updating an ...

    Note that there is no logic here for incrementing versionId when updating an orderable (OLMIS-3887). Also, this does not have FTAP versioning (OLMIS-5308).

    Łukasz Lewczyński

    Missing changelog. Do I feel like this is a breaking change?

    Missing changelog. Do I feel like this is a breaking change?

    Chongsun Ahn

    Not currently in the APIs. So reference data is still at 11.1.0-SNAPSHOT. CHA...

    Not currently in the APIs. So reference data is still at 11.1.0-SNAPSHOT. CHANGELOG added.

    /src/.../repository/FacilityTypeApprovedProductRepositoryIntegrationTest.java Changed
    /src/.../repository/OrderableRepositoryIntegrationTest.java Changed 2
    /src/.../web/CommodityTypeControllerIntegrationTest.java Changed
    Open in IDE #permalink
    /src/.../web/FacilityTypeApprovedProductControllerIntegrationTest.java Changed
    /src/.../web/OrderableControllerIntegrationTest.java Changed
    /src/.../web/OrderableFulfillControllerIntegrationTest.java Changed
    Open in IDE #permalink
    /src/.../domain/FacilityTypeApprovedProduct.java Changed
    /src/main/.../domain/Orderable.java Changed
    /src/main/.../domain/OrderableIdentity.java Added
    Open in IDE #permalink
    /src/main/.../domain/ProgramOrderable.java Changed
    /src/main/.../dto/OrderableDto.java Changed
    /src/.../errorhandling/RefDataErrorHandling.java Changed
    /src/.../impl/FacilityTypeApprovedProductRepositoryImpl.java Changed
    /src/.../impl/OrderableRepositoryImpl.java Changed
    /src/.../repository/FacilityTypeApprovedProductRepository.java Changed
    /src/.../repository/OrderableRepository.java Changed
    /src/.../repository/RepositoryConstants.java Added
    /src/.../service/FacilityTypeApprovedProductBuilder.java Changed
    /src/main/.../service/OrderableService.java Changed
    /src/.../web/FacilityTypeApprovedProductController.java Changed
    /src/main/.../web/OrderableController.java Changed
    /src/.../web/OrderableFulfillController.java Changed
    /src/main/.../web/OrderableFulfillFactory.java Changed
    /src/.../demo-data/facility_type_approved_products_for_Essential_Medicines___District_Hospital.csv Changed
    /src/.../demo-data/full_supply_products.csv Changed
    /src/.../demo-data/non-full_supply_products.csv Changed
    /src/main/.../db/demo-data/orderables.csv Changed
    /src/.../demo-data/referencedata.facility_type_approved_products.csv Changed
    /src/.../demo-data/referencedata.orderable_identifiers.csv Changed
    /src/.../demo-data/referencedata.orderables.csv Changed
    /src/.../demo-data/referencedata.program_orderables.csv Changed
    /src/.../migration/20180821210354785__add_versions_to_orderables.sql Added
    Open in IDE #permalink
    /src/main/.../schemas/approvedProductDto.json Changed
    /src/main/resources/schemas/metadata.json Added
    Open in IDE #permalink
    /src/main/resources/schemas/orderable.json Changed
    /src/main/resources/api-definition.yaml Changed
    /src/.../domain/OrderableIdentityTest.java Added
    Open in IDE #permalink
    /src/test/.../domain/OrderableTest.java Changed
    Open in IDE #permalink
    /src/test/.../domain/ProgramOrderableTest.java Changed
    Open in IDE #permalink
    /src/test/.../dto/OrderableDtoTest.java Added
    Open in IDE #permalink
    /src/.../service/FacilityTypeApprovedProductBuilderTest.java Changed
    /src/.../service/OrderableServiceTest.java Changed
    /src/.../testbuilder/OrderableDataBuilder.java Changed
    /src/.../web/OrderableFulfillFactoryTest.java Changed
    Open in IDE #permalink
    /CHANGELOG.md Changed

    Review updated: Reload | Ignore | Collapse

    You cannot reload the review while writing a comment.

    Log time against