HRID handling in Inventory for Instance records
RCA Group
Description
Environment
Potential Workaround
Attachments
blocks
defines
has to be done after
relates to
Checklist
hideTestRail: Results
Activity

Ann-Marie Breaux December 2, 2019 at 4:12 PM
OK - I'm closing this.
cc:

Ann-Marie Breaux December 2, 2019 at 2:23 PM
Hi I'm fine with closing this.

Marc Johnson December 2, 2019 at 1:36 PM
Thank you for testing this functionality.
I think we need to be careful not to include all of the HRID scope for instances within this change.
This change represents only changes to mod-inventory to facilitate the new instance HRID sequence. It is a side effect of how we have split up FOLIO and chosen to also split up requirements that we get oddities like this story.
I think scenarios 2 and 3 are not testable from a users perspective. I believe they have been tested by developers as part of . can likely confirm that. If folks who are familiar with the API want to test this, then I'm happy for them to do so. I don't think it should block closing this work, scenario 1 and 4 effectively mimic this via other routes.
I think scenario 5 should be considered orders behaviour, and not be included in this story (and effectively overlaps with scenario 4 from this modules perspective). If that reveals a bug in inventory, then we should raise that once the orders work is being tested.
Normally, backend stories would be closed after merging and any review conducted via user or other clients work.

Ann-Marie Breaux December 2, 2019 at 11:18 AM
Hi and I tested the various scenarios outlined in this ticket, plus added a couple more. The behavior in scenario 1 is as expected. If the Instance is linked to an underlying MARC record, the HRID is supplied from the 001 field.
Scenario 5 cannot be tested until an order bug is fixed.
Scenarios 2 and 3 require adding records directly to mod-inventory or mod-inventory-storage. Is that something that one of you could do? If not, then I think could help us with testing it.

Marc Johnson December 2, 2019 at 9:11 AM
thank you for testing this. Did you say you tested new instances via duplication? If so, I think these are two separate scenarios.
The data import behaviour is not in scope of this change, it is part of . That said, I don’t know where the random number is coming from. does data import generate it’s own HRIDs at the moment?
Details
Details
Assignee

Reporter

Tester Assignee

1. If Instance is linked to an underlying MARC record
Map the HRID from the MARC 001
2. If Instance is loaded directly into Inventory and the HRID field is present in the incoming JSON data [no linked MARC record in SRS]
Retain that number as the HRID in Inventory
Do not add any prefix specified in Settings (library should have entered it in the incoming file if it was wanted)
Not sure how to test
3. If Instance is loaded directly into Inventory and the HRID is not present in the incoming JSON data [no linked MARC record in SRS]
Assign next FOLIO HRID based on the Instance sequential number generator in Inventory and the starting number in Settings
Assign the Instance prefix based on the optional prefix defined in Settings
Map that number to the HRID of the corresponding Instance record
Not sure how to test
4. If Instance is keyed manually into Inventory [no linked MARC record in SRS]
Assign next FOLIO HRID based on the Instance sequential number generator in Inventory and the starting number in Settings
Assign the Instance prefix based on the optional prefix defined in Settings
Map that number to the HRID of the corresponding Instance record
5. If Instance is created from a new order created in the Orders app [no linked MARC record in SRS]
Assign next FOLIO HRID based on the Instance sequential number generator in Inventory and the starting number in Settings
Assign the Instance prefix based on the optional prefix defined in Settings
Map that number to the HRID of the corresponding Instance record
cannot test until MODORDERS-343 is resolved
6. Once assigned, HRID is not editable
Separate stories for HRID handling for MARC Bibs in MARCcat (MODCAT-136) and for MARC Bibs in SRS ()