MODDATAIMP-1010: Quantity = 0 for electronic format orders
Reported issue:
https://folio-org.atlassian.net/browse/MODDATAIMP-1010
When creating orders with an order format of electronic, an instance, and a holdings records from a MARC bibliographic record using Data Import, the quantity in both the ‘Cost details' and ‘Location’ section of the POL is ‘0' despite the field mapping profile instructing it be '1’.
Understanding of issue:
We identified that the reported issues seem to be stemming from the introduction of a ‘Check’ & ‘Overlay’ process that was implemented in Poppy to align Holdings & Items details with corresponding Locations & Quantities when processing Orders with Inventory entities via Data Import.
Related Jira tickets:
UXPROD-2741 - Import of MARC Bibs to create/update multiple holdings and items: BE work
MODORDERS-876 - Extra holdings/items created for open orders via data import, some without POL links
MODORDERS-881 - Populate locations and material type for POLs when multiple Holdings/Items were created
Proposed solution:
At a high level, the proposed solution is to completely remove the ‘Overlay’ aspect of the current process, and keep the ‘Check’ piece for comparing Order details against created Inventory entities only if the Order mapping has ‘Receiving workflow’ set to “Synchronized”.
In the event that the Order details differ from the created Inventory entities, then the job will complete with errors and the log will show an error explaining that. For example: This Job contains Order mapping with 'Receiving workflow' set to "Synchronized". However, Location and Quantity of Inventory entities created by this Job profile do not align with those found in the Order. Please review.
If Receiving workflow' is set to “Independent”, then the expectation is that the user does not need the Order Location & Quantity details to match the created Items or Holdings. Therefore, there will be no check to compare these details.
Proposed Solution Requirements:
Feature: Use 'Receiving workflow' value to determine whether created Holdings & Items should be compared against Order mapping when creating Orders & Inventory entities via Data Import.
Scenario 1 - Receiving workflow set to Independent:
Given a Data Import Job profile is run to create Orders, Instances, and/or Holdings, and/or Items
And Order mapping has Receiving workflow set to "Independent"
Then no check or overlay is applied. Users can create however many Inventory entities and they do not need to match the Order details
Scenario 2 - Receiving workflow set to Synchronized - Locations/Quantities match:
Given a Data Import Job profile is run to create Orders, Instances, and/or Holdings, and/or Items
And Order mapping has Receiving workflow set to "Synchronized"
Then a check should be run to confirm that Location & Quantity details described in the Order match with the Holdings and/or Items created from the Data Import Job.
If Order quantity/location details match hose of created Holdings & Items, then complete job with no errors.
Scenario 3 - Receiving workflow set to Synchronized - Locations/Quantities do not match:
Given a Data Import Job profile is run to create Orders, Instances, and/or Holdings, and/or Items
And Order mapping has Receiving workflow set to "Synchronized"
Then a check should be run to confirm that Location & Quantity details described in the Order match with the Holdings and/or Items created from the Data Import Job.
If Order quantity/location details DO NOT match those of created Holdings & Items, then complete job with an error describing the mismatch.
Diagrams: