Skip to content

CIRC-2712 adjust reading room shelf expiration on recall - #1718

Merged
nielserik merged 3 commits into
masterfrom
CIRC-2712
Nov 24, 2026
Merged

nielserik merged 3 commits into
masterfrom
CIRC-2712

Conversation

@nielserik

Copy link
Copy Markdown
Contributor

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.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🟡 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

Copilot AI left a comment

Copy link
Copy Markdown

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 were identified for the change capping reading-room hold-shelf expiration at the end of the revised due-date day.

No open issues 🎉

1 resolved since last review

Review effort: Balanced

@nielserik
nielserik requested a review from a team November 23, 2026 19:59
@sonarqubecloud

Copy link
Copy Markdown

@nielserik
nielserik merged commit 449418d into master Nov 24, 2026
16 checks passed
@alexanderkurash
alexanderkurash deleted the CIRC-2712 branch November 25, 2026 09:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants