Recalls not being honored when there has been a renew or change due date

Description

 

We’re having trouble with recalls on loans that have been renewed or have changed due date.
Our loan policy 90/14 days says the loan period is 90 days. If the item is requested, it is recalled and the minimum guaranteed loan period for the recalled item is 14 days. This works fine. The loan period will be shortened to the guaranteed 14 days with a recall return interval of 2 days.
But if a patron has already had the item for 90 days and so made a renewal (that is now more than 14 days) or if we’ve used change due date, if a recall is made the loan period is not shortened. What are we doing wrong?FOLIO Steps to reproduce:
1. Lend an item with a permanent loan type standard loan to a patron from any patron group.
2. Wait until you can and renew or change the due date (to date more than 14 days in the future).
3. As another patron make a request and recalls the item.

Expected result:
The loan period for the first patron is shortened making allowance for the guaranteed 14 days.

Actual result:
No change in the loan period.

 

To test the flag clear for renewals:

1.  Set up a loan policy in which the minimum guaranteed loan period for recalled items is less than the full check-out period and renewal check-out period (I've been using a 60-day checkout with a 14 day recall period and a 60-day renewal).  Attach that to an item.

2. Check the item out to a patron.  I've been using the checkout-by-barcode endpoint directly with postman so that I can set the checkout date far enough in the past to make renewals possible.

3. Place a recall on the item for a different patron

4.  Verify that the due date is truncated and the loan object shows the 
dueDateChangedByRecall flag is set to "true" when it's pulled from the circulation/loans endpoint

5. Cancel the recall
 
6.  Renew the checked-out item
 
7.  The loan due date should now reflect the full check-out period for renewals (not truncated).  The loan object should show the "dueDateChangedByRecall" flag set to "false."  

8.  Place another recall on the item.

9.  Verify that the due date of the loan is truncated and the "dueDateChangedByRecall" flag set to "true"

To Test Flag Clear Using Change Due Date

1. Set up a loan policy similar to the one above and attach to an item.

2. Check the item out to a patron

3. Place a recall on the item for another patron.

4.  Verify that the due date is truncated and the loan object shows the 
dueDateChangedByRecall flag is set to "true" when it's pulled from the circulation/loans endpoint.

5. Cancel the recall.

6. Manually change the due date of the checked-out item using the UI. The value you change it to shouldn't matter, but it will make it easier to test if you lengthen the check-out period, as it will make date truncation easier to see.

7. If you can, use postman to pull the loan object directly from the circulation/loans endpoint and verify the dueDateChangedByRecall flag is now set to "false."

8. Place another recall on the item.

9. Verify the due date is properly truncated, and the dueDateChangedByRecall flag is now set to "true."

 

Interested parties:

CSP Request Details

None

CSP Rejection Details

None

Potential Workaround

None

Attachments

8

Checklist

hide

TestRail: Results

Activity

Show:

Brooks Travis November 22, 2021 at 4:53 PM

Verified in Kiwi Bugfest

Kyle Felker November 19, 2021 at 4:32 PM

>I agree with Marc Johnson that if we can include this in the Kiwi GA, we should try to do so.

Good, cos it's 90% done.

Brooks Travis November 19, 2021 at 3:52 PM

I agree with  that if we can include this in the Kiwi GA, we should try to do so.

Marc Johnson November 19, 2021 at 3:44 PM
Edited

It is extremely unfortunate that we have overlapping functionality between an action-based endpoint and a record-based endpoint.

It is unfortunate. We have quite a few examples of this in FOLIO (especially as action based endpoints were a later design choice)

I took the decision to have them side by side in order to allow for a graceful transition over. And then have a conversation about removing the old one (which has the potential to be contentious, as I believe folks may be using it for migration).

The transition did not get completed and so we still have both.

When an action-based endpoint exists, the fields it changes should be changeable exclusively through said endpoint and not by any other means.

With the current FOLIO architecture, that is challenging to accomplish. This is primarily down to the storage / business logic split and how storage APIs are as accessible as business logic ones are.

We can plan to get rid of the business logic endpoint. I think that needs to come after a transition and needs agreement from the community.

We have to have an endpoint in storage that allows for a client to change the due date of a loan with a PUT (or similar) because other operations e.g. renewal or recall change that information.

We could stop due dates from being changed via that without an additional desired permission.

Marc Johnson November 19, 2021 at 3:38 PM

I just learned that this was pulled from the Kiwi release.

I think it was primarily pulled from the Kiwi release out of concerns it might not make it in time.

Given the extension that was granted due to other issues, I think we may want to include it back in now that we have re-tested after some new changes.

What do you think?

The Status is AWAITING RELEASE. It the correct version AWAITING RELEASE or is there re-work that needs to be done?

I was working on the basis that folks would still want it in Kiwi and released as soon as possible.

Please let me know if that is incorrect and we shouldn't back port the last third of this change (the other two thirds have already been back ported and released).

Done

Details

Assignee

Reporter

Labels

Priority

Story Points

Sprint

Development Team

Prokopovych

Fix versions

Release

R3 2021 Bug Fix

Affected Institution

5 Colleges
BNCF
Caltech
Chalmers
Cornell
Duke
GBV
Grand Valley State University
Lehigh
MI State University/Library of Michigan
Middle Tennessee State University
MO State
Okanagan College
OTHER
SHL
Simmons
Skidmore College
Spokane Public Libraries
St. Michael's College
STU
TAMU
Trinity College
Universidad de Concepción
University of Alabama
University of Chicago
University of Leipzig
University of Tennessee Martin
University of Zaragoza
Warner
Washington-Jefferson

TestRail: Cases

Open TestRail: Cases

TestRail: Runs

Open TestRail: Runs

Created March 4, 2021 at 6:01 PM
Updated June 17, 2024 at 12:13 PM
Resolved November 19, 2021 at 1:35 PM
TestRail: Cases
TestRail: Runs