Skip to content

ILLDEV-465 Add update-metadata action - #698

Merged
jakub-id merged 2 commits into
mainfrom
ILLDEV-465
Aug 4, 2026
Merged

ILLDEV-465 Add update-metadata action#698
jakub-id merged 2 commits into
mainfrom
ILLDEV-465

Conversation

@JanisSaldabols

Copy link
Copy Markdown
Collaborator

No description provided.

Copilot AI review requested due to automatic review settings July 31, 2026 11:31

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.

Pull request overview

Adds a new borrower workflow step (update-metadata) so patron-request bibliographic metadata can be refreshed via the configured catalog lookup adapter after validation, and before sending the request onward. This moves metadata-update behavior out of request creation and into the state model/action pipeline.

Changes:

  • Extend the borrower state model with update-metadata (auto) and a new METADATA_UPDATED state between VALIDATED and send-request.
  • Implement update-metadata in PatronRequestActionService, including optional “decisionDetails” event custom data about what changed and why.
  • Remove metadata-update-on-create from the patron request API handler and update wiring/tests accordingly.

Reviewed changes

Copilot reviewed 9 out of 9 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
misc/state-models.yaml Inserts update-metadata auto action and METADATA_UPDATED state into the borrower workflow.
broker/test/patron_request/api/api-handler_test.go Updates an integration-style test expectation to reflect update-metadata as the last action before review.
broker/patron_request/service/statemodel_capabilities.go Adds new borrower state/action constants and exposes them as built-in capabilities.
broker/patron_request/service/action.go Implements the update-metadata borrower action and moves metadata update logic into the action service.
broker/patron_request/service/action_test.go Updates action-flow tests for the new state/action and adds unit tests for metadata update behavior/details.
broker/patron_request/service/action_mapping_test.go Updates expected action mapping to route VALIDATED -> update-metadata -> METADATA_UPDATED -> send-request.
broker/patron_request/api/api-handler.go Removes metadata update behavior (and related dependencies) from request creation.
broker/patron_request/api/api-handler_test.go Removes metadata-update unit tests that were tied to the API handler.
broker/app/app.go Wires the lookup adapter factory + directory adapter into the action service and removes now-unused API handler setters.

Comment thread broker/patron_request/service/action.go
@jakub-id
jakub-id merged commit 5226de3 into main Aug 4, 2026
8 checks passed
@jakub-id
jakub-id deleted the ILLDEV-465 branch August 4, 2026 12:22
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