Skip to content

ILLDEV-604 Update bibRecordId automatically - #865

Open
JanisSaldabols wants to merge 1 commit into
mainfrom
ILLDEV-604
Open

JanisSaldabols wants to merge 1 commit into
mainfrom
ILLDEV-604

Conversation

@JanisSaldabols

Copy link
Copy Markdown
Collaborator

No description provided.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 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 supplierUniqueRecordId and 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

@JanisSaldabols
JanisSaldabols marked this pull request as ready for review November 13, 2026 13:44

@jakub-id jakub-id left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants