Repository navigation
Conversation
There was a problem hiding this comment.
🟡 Changes recommended
The recall guard relies on the current policy rather than the loan’s persisted held-for-use-at-location state, so policy changes can leave shelf expiration later than the shortened due date.
1 open issue
What changed in this PR
This PR addresses CIRC-2712 by adjusting reading-room hold shelf expiration during recall so it does not fall on a later calendar day than the updated loan due date.
Changes:
- Caps shelf expiration at the end of the due-date day in the configured time zone, after closed-library adjustments and before saving the loan.
- Adds parameterized tests covering shelf expiration before, on, and after the recalled due-date day.
| File | Description |
|---|---|
src/test/java/api/loans/LoansForUseAtLocationTests.java |
Tests recall-related shelf expiration capping across three expiration periods. |
src/main/java/org/folio/circulation/domain/UpdateLoan.java |
Adds shelf expiration adjustment to the recall flow. |
Review effort: Balanced
roman-barannyk
approved these changes
Nov 24, 2026
|
alexanderkurash
approved these changes
Nov 25, 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.




Purpose
When a reading room loan is recalled for an item that is held on the shelf for next use, the hold shelf expiration date should be adjusted to not fall on a later date than the new due date that is set in connection with the recall.
Approach
Add a method call to the recall procedure that adjusts the hold shelf expiration date after the due date is defined and before the loan is persisted.