Error editing the "Temporary" field in the holding
Description
CSP Request Details
CSP Rejection Details
Potential Workaround
Attachments
- 11 Mar 2025, 01:56 PM
- 11 Mar 2025, 01:56 PM
- 11 Mar 2025, 01:56 PM
- 11 Mar 2025, 01:56 PM
- 24 Feb 2025, 10:11 AM
Checklist
hideActivity
Svitlana Kovalova March 11, 2025 at 1:56 PMEdited
Hey @Oleksandr Hladchenko the bug is that when a holding is created, its updatedByUserId
field is empty. It is not reproduced on Okapi because the flow is not fully executed and crashes with an invalid token error. I also checked the logs on Okapi Bugfest, the token is invalid (mod-inventory log):
There is no problem with the token in Eureka, the flow is executed further with the holding
update. When mod-inventory
processes the received event (DI_SRS_MARC_HOLDINGS_HOLDING_HRID_SET) from SRS and updates the holding
via PUT endpoint in mod-inventory-storage
, the user ID is not passed via the header, and accordingly the updatedByUserId
field in holding
is empty.
I think it would be empty in Okapi too, because the data for the context is taken from the Kafka header of the DI_SRS_MARC_HOLDINGS_HOLDING_HRID_SET
event, and there is no user ID in the Kafka header in either Okapi or Eureka.
In the Okapi is produced only CREATE holding message (version=1), while in the Eureka are produced CREATE and UPDATE holding messages (version=2)
Okapi: inventory.holdings-record
1 message
Eureka: inventory.holdings-record
2 messages
As a potential fix, can be forward the existing user ID further along the chain of events from the DI_INVENTORY_HOLDINGS_CREATED_READY_FOR_POST_PROCESSING
event (there is a user ID in the Kafka header) to the DI_SRS_MARC_HOLDINGS_HOLDING_HRID_SET
Kafka header event in the SRS:
Additional information: short sequence of event calls:
SRM (DI_RAW_RECORDS_CHUNK_PARSED) ->
SRS (DI_PARSED_RECORDS_CHUNK_SAVED) ->
SRM (DI_SRS_MARC_HOLDING_RECORD_CREATED) ->
mod-inventory (POST create holding) -> mod-inventory-storage (inventory.holdings-record CREATE),
mod-inventory (DI_INVENTORY_HOLDINGS_CREATED_READY_FOR_POST_PROCESSING) ->
SRS (DI_SRS_MARC_HOLDINGS_HOLDING_HRID_SET) ->
mod-inventory (PUT update holding) -> mod-inventory-storage (inventory.holdings-record UPDATE)
cc: @Pavlo Smahin @Khalilah Gambrell @Valery_Pilko @Denys Bohdan
Valery_Pilko March 11, 2025 at 1:09 PM
Hey @Khalilah Gambrell - I guess so, changing the team to Folijet
Khalilah Gambrell March 11, 2025 at 12:26 PM
Hey @Valery_Pilko - I think this is a Folijet issue?
When trying to change the "Temporary" field in the added "MARC holdings record ", an error occurs that does not allow saving the file
Steps to reproduce:
Go to “Data import“ app
Click “Or choose files“ →Select mrc file -> Select “Default job profile”
Click on file name ->Click “Create“ hotlink in Instance column
Click “Actions“ button → Select “Add MARC holdings record“
Click “Permanent location look-up“ → Select any value → Click “Save & close“ button in modal → Click “Save & close“ button in “Create a new MARC Holdings record“ window
Click “Actions“ button → Select “Edit“
Edit "Temporary" field to any value
Click “Save & close“ button
Expected result: Holding is saved with new values
Actual result:Error notification appears and the changes are not saved.