Uploaded image for project: 'mod-inventory-storage'
  1. mod-inventory-storage
  2. MODINVSTOR-829

Handle delete of statistical code associated with instance, holdings, or item properly..

    XMLWordPrintable

Details

    • Story
    • Status: Closed (View Workflow)
    • P2
    • Resolution: Done
    • None
    • 24.0.0
    • Prokopovych - Sprint 133, Prokopovych - Sprint 134, Prokopovych - Sprint 135, Prokopovych - Sprint 136, Prokopovych - Sprint 137, Prokopovych - Sprint 138, Prokopovych - Sprint 139, Prokopovych - Sprint 140, Prokopovych - Sprint 141, Prokopovych - Sprint 142, Prokopovych - Sprint 143
    • Prokopovych
    • Morning Glory (R2 2022)
    • !!!ALL!!!

    Description

      Overview:

      There is nothing in place to remove a statistical code from instance, holdings, or item when they are deleted from the settings.

      Additional Information:

      There are several options.

      A) "Ignore/don't care": Keep the (orphaned) statistical codes in the instance, holdings and item records, and delete it from the statistical code settings. This is useless because the record can no longer been changed (to update status (loan!), location, etc.) because any update will be rejected due to the non-existing statistical code (unless we change the insert and update APIs to automatically remove any non-existing statistical codes).

      B) "Block delete": Add a database trigger that automatically runs when a statistical code is deleted from the settings. It blocks the delete if the statistical code is still in use in any instance, holdings or item record.

      C) "Delete cascade": Add a database trigger that automatically runs when a statistical code is deleted from the settings. It deletes the statistical code from all instance, holdings or item records.

      Implementation option:

      B) and C) might be implemented by an item_statistical_code table that consists of two foreign key columns: itemId and statisticalCodeId. A trigger that runs on any item insert, update and delete can copy the content of the statisticalCodeIds array into the table.

      Interested parties:

      julianladisch lauraw

      TestRail: Results

        Attachments

          Issue Links

            Activity

              People

                kday Kevin Day
                wwelling William Welling
                Charlotte Whitt Charlotte Whitt
                Votes:
                0 Vote for this issue
                Watchers:
                10 Start watching this issue

                Dates

                  Created:
                  Updated:
                  Resolved:

                  TestRail: Runs

                    TestRail: Cases