Uploaded image for project: 'mod-orders'
  1. mod-orders
  2. MODORDERS-500

Validate location element which should contain locationId or holdingId

    XMLWordPrintable

Details

    • Story
    • Status: Closed (View Workflow)
    • P3
    • Resolution: Won't Do
    • None
    • None
    • None
    • Thunderjet

    Description

      Purpose/Overview:
      In order to support UIIN-574 - In the Acquisition accordion for the holding need to show order details information

      Requirements/Scope:

      Prevent creation order line where Location element contains both "locationId" and "holdingId".

      One of  "locationId" and "holdingId" should be in Location element

       

      Use Cases:

      Background: for each order and not package poLines 

      1. Location of the POL should contain reference only on holding (holdingId)   

      Given “Create inventory” for physical or electronic have “INSTANCE_HOLDING”  OR "INSTANCE_HOLDING_ITEM" 

      When create or update POL 

      Then Location element of the POL should contain only "holdingId"

       

      2. Location of the POL should contain reference only on location (locationId)   

      Given “Create inventory” for physical or electronic have “INSTANCE"  OR "NONE" 

      When create or update POL 

      Then Location element of the POL should contain only "locationId"

       

      Approach:

      1. Create method in the org.folio.orders.utils.validators.CompositePoLineValidationUtil.isLocationValid(CompositePoLine compPOL)
      2. Use method from (1) in the :
      • org.folio.helper.PurchaseOrderLineHelper#createPoLine(org.folio.rest.jaxrs.model.CompositePoLine)
      • org.folio.helper.PurchaseOrderLineHelper#updateOrderLine(org.folio.rest.jaxrs.model.CompositePoLine)

      Acceptance criteria:

      • Logic updated
      • Unit tests
      • API Tests updated or created

      TestRail: Results

        Attachments

          Issue Links

            Activity

              People

                dennisbridges Dennis Bridges
                Andrei_Makaranka Andrei Makaranka
                Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                  Created:
                  Updated:
                  Resolved:

                  TestRail: Runs

                    TestRail: Cases