Repository navigation
ILLDEV-604 Update bibRecordId automatically - #865
JanisSaldabols wants to merge 1 commit into
Conversation
There was a problem hiding this comment.
🟢 Approval recommended
No active review issues block approval of the change to derive read-only bibliographic IDs from ILL request metadata.
No open issues 🎉
What changed in this PR
This PR makes the broker’s bibRecordId a read-only value derived from the ILL request, keeping shared-index links and outgoing identifiers aligned with metadata edits and retries.
Changes:
- Derive borrowing IDs from
supplierUniqueRecordIdand lending IDs from ReShare-coded bibliographic records. - Remove direct ID input from create, update, and import contracts while retaining the legacy database column.
- Update documentation and regression coverage for automatic ID derivation and exchange.
| File | Description |
|---|---|
bruno/crosslink/PR Happy flow/Find lending PR id.bru |
Check the lending ID against the captured borrowing ID. |
bruno/crosslink/PR Happy flow/Create borrowing side PR.bru |
Capture the derived ID instead of supplying one. |
broker/test/patron_request/api/api-handler_test.go |
Verify derived IDs through persistence, edits, and clearing. |
broker/README.md |
Document derivation rules and read-only behavior. |
broker/patron_request/service/rerequest_test.go |
Check outgoing IDs for retries and rerequests. |
broker/patron_request/service/message_sender.go |
Derive the outgoing ReShare identifier from request metadata. |
broker/patron_request/service/create.go |
Retain lending ID validation without populating the legacy column. |
broker/patron_request/service/bib_record_id.go |
Add side-specific ID derivation. |
broker/patron_request/service/bib_record_id_test.go |
Cover metadata changes and shared-ID exchange. |
broker/patron_request/service/action.go |
Stop copying the legacy ID into successor requests. |
broker/patron_request/api/api-handler.go |
Return derived IDs and remove direct ID assignments. |
broker/patron_request/api/api-handler_test.go |
Verify side-specific mapping and ignored ID input. |
broker/oapi/open-api.yaml |
Define the ID as read-only and remove input properties. |
broker/import/service/importer.go |
Remove direct ID mapping during import. |
broker/import/service/importer_test.go |
Verify imports reject the removed ID property. |
Review effort: Balanced
jakub-id
left a comment
There was a problem hiding this comment.
Could we remove the legacy bib_record_id column in a follow-up cleanup, along with its SQL references, mappings, and persistence tests? Keeping it around could be misleading now that bibRecordId is derived from illRequest. We should deploy code that no longer references the column before dropping it, to support rolling upgrades.
No description provided.