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

Cleanup inventory records when an order is Deleted

    XMLWordPrintable

    Details

    • Type: Story
    • Status: Closed (View Workflow)
    • Priority: P3
    • Resolution: Duplicate
    • Affects Version/s: None
    • Fix Version/s: None
    • Labels:
    • Template:
    • Story Points:
      5
    • Development Team:
      Thunderjet
    • Release:
      Lotus R1 2022

      Description

      *Overview: *
      Leaving item records in inventory that were never received which reference an order that has been deleted prevents the user from maintaining a clean and relevant inventory.

      Note: We need to discuss with the inventory team what they would like us to do with instance/holding/item records that acquisitions might have created if the order is deleted. – Leave inventory records, just delete holdings/items

      Given an order was created and opened
      When one or more items are in the item status "On order" and the order is deleted
      Check if the item doesn't have any requests associated with it
      Then those piece records and item records are deleted if both the above conditions are satisfied. Leave the Items in any other status as-is

      Given the On order item records are deleted in the above step
      When the holding no longer has items related to it
      Check that no Order lines have locations that match that holding **
      If none match
      Then delete the holding

      Acceptance criteria:

      • pieces, items and holdings are deleted according to the logic described above
      • Unit tests are updated
      • API tests are updated

      Notes:

        • If so, we need to track that mod-orders created the record... either in the order/po_line or the holding record.
        • Must be careful not to remove if other po_lines are using those records.

        TestRail: Results

          Attachments

            Issue Links

              Activity

                People

                Assignee:
                Unassigned Unassigned
                Reporter:
                cmcnally Craig McNally
                Tester Assignee:
                Craig McNally Craig McNally
                Votes:
                0 Vote for this issue
                Watchers:
                10 Start watching this issue

                  Dates

                  Created:
                  Updated:
                  Resolved:

                    TestRail: Runs

                      TestRail: Cases