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

Automatically adjust order status based on poLine's paymentStatus and receivingStatus

    XMLWordPrintable

    Details

    • Template:
    • Sprint:
      ACQ Sprint 62
    • Story Points:
      5
    • Development Team:
      Thunderjet

      Description

      Overview:
      PO status should automatically be updated to "Closed" (reason for closure is "Complete") when the following conditions are met:

      • the order has
        workflowStatus == "Open"
      • all PoLines have:
        (paymentStatus == "Not required" OR paymentStatus == "Fully paid") 
        AND 
        (receivingStatus == "Fully received" OR receivingStatus == "Receiving not required")
        

      PO status should automatically be updated to "Open" when the following conditions are met:

      • the order has
        workflowStatus == "Closed"
      • not all PoLines have:
        (paymentStatus == "Not required" OR paymentStatus == "Fully paid") 
        AND 
        (receivingStatus == "Fully received" OR receivingStatus == "Receiving not required")
        

      Dennis Bridges to check with the small group on whether a notification is required/desired in this case, and the preferred mechanism for such notifications (toast/email/confirmation modal/etc.) If any work is required for notifications it will be handled in a separate story.

      We've discussed using the vertx event-bus to manage the state of the fields which contain summary information (See https://issues.folio.org/browse/MODORDERS-173). That approach seems like a good fit for this situation...

      • When a PoLine's (paymentStatus or receivingStatus) are updated, fire an event. (PUT /orders/order-lines)
      • The event will trigger a handler that will update the order's workflowStatus if needed (based on the criteria above)

      Acceptance criteria:

      • The business logic described above has been implemented
      • Unit tests have been updated
      • API tests have been updated

        TestRail: Results

          Attachments

            Issue Links

              Activity

                People

                Assignee:
                dennisbridges Dennis Bridges
                Reporter:
                cmcnally Craig McNally
                Tester Assignee:
                Dennis Bridges Dennis Bridges
                Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                  Dates

                  Created:
                  Updated:
                  Resolved:

                    TestRail: Runs

                      TestRail: Cases