ILLDEV-465 Add update-metadata action - #698
Merged
Merged
Conversation
Contributor
There was a problem hiding this comment.
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 newMETADATA_UPDATEDstate betweenVALIDATEDandsend-request. - Implement
update-metadatainPatronRequestActionService, 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. |
jakub-id
approved these changes
Jul 31, 2026
jakub-id
approved these changes
Aug 4, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.