Truncate due date based on patron expiration at check out
Description
Environment
Potential Workaround
Attachments
defines
relates to
Checklist
hideTestRail: Results
Activity

Cheryl Malmborg June 4, 2021 at 9:44 PM
I didn't find any bugs in testing hour and minute loan periods.
Test date: 6/3/2021
Calendar: Su 8-18:00
M closed
Tu closed
W closed
Th 8-21:00
F closed
Sa 8-18:00
Tested: 3 hour loan period with closed management due beginning of next open day
Test0604 (exp 6/4) checked out 7:55pm due 9:00pm
Test0606 (exp 6/6) checked out 7:58pm due 6/5 9:00am (next open day)
Tested: 30 minute loan period with closed management due beginning of next open day
Test0604 (exp 6/4) checked out 8:45pm due 9:00pm
Test0606 (exp 6/6) checked out 8:46pm due 6/5 9:00am (next open day)
Tested: 3 hour loan period with closed management keep current date
Test0604 (exp 6/4) checked out 9:27pm due 6/4 00:00 (midnight)
Test0606 (exp 6/6) checked out 9:29pm due 6/4 12:29am

Darcy Branchini June 3, 2021 at 7:07 PM
Closing and filed bugs for specific issues. See , and .

Darcy Branchini June 3, 2021 at 2:35 PM

Darcy Branchini June 3, 2021 at 1:12 PMEdited
, just tested one scenario and I still see the problems with the closed due date management and patron expiration. I'll attach the example. Perhaps I can run through this together with you?
Original due date (before closed due date management or patron expiration): 6/8/21
Due date with closed due date management (but NOT patron expiration): 6/6/21
Due should with both closed due date management and patron expiration should be: 6/3/21 (same as check out since expiration is 6/4 and that's a closed day)
Note patron expiration and due date on this screenshot.

Darcy Branchini May 28, 2021 at 5:57 PMEdited
I tested this today but there were a few errors. I'm attaching the spreadsheet with my tests and the results. Errors seem to be in 3 buckets:
Closed due date mgmt = Keep the current due date AND patron expiration date was earlier: Due dates were correct; however, the time was set to 12:00 AM when truncated and it should be set to 11:59 PM.
Closed due date mgmt = Move to the end of previous open day: Worked for most tests (9 total), except when the patron expiration is before the previous open day.
Closed due date mgmt = Move to the end of next open day: Worked for most tests (9 total), except when the patron expiration equals the next open day and some circumstances when the patron expiration is before the original due date (before closed due date mgmt).
See worksheet titled "Tests - post implementation"
cc:
Details
Details
Assignee

Reporter

Tester Assignee

Purpose: When CHECKING OUT an item, don't allow items to be due after the patron has expired.
Scenarios
Scenario - Summary of scenarios below
Given a CHECK OUT for an item for a user with an expiration date X
When the calculated due date according to the circulation rule is date Y, after X
Then truncate the item’s due date and time to the latest date and time where the service point is open, and the user is not expired
Scenario
Given a CHECK OUT for an active user with an expiration date, and triggering a loan policy with closed library due date management set to one of the following:
Move to the end of the previous open day
Move to end of next open day
When the calculated due date, factoring in closed library due date management, is AFTER the patron's expiration date
Then truncate the due date to the end of the last open day before the patron expires
NOTE: When the calculated due date, factoring in closed library due date management, is BEFORE the patron's expiration date, then the due date will be the end of the previous open day OR the end of the next open day (in other words, there's no change to the existing logic).
Scenario
Given a CHECK OUT for an active user with an expiration date, and triggering a loan policy with closed library due date management set to one of the following:
Keep the current due date
Keep the current due date/time
When the calculated due date, factoring in closed due date management, is AFTER the patron's expiration date
Then truncate the due date to the patron's expiration date and time
NOTE: When the calculated due date, factoring in closed library due date management, is BEFORE the patron's expiration date, then the due date will be the current due date OR the current due date/time (in other words, there's no change to the existing logic).
Scenario
Given a CHECK OUT for an active user with an expiration date, and triggering a loan policy with closed library due date management set to one of the following:
Move to the end of the current service point hours
Move to beginning of next open service point hours
When the calculated due date/time, factoring in closed library due date management, is AFTER the patron's expiration date
Then truncate the due date to the end of the last open service point hours before the patron expires
NOTE: When the calculated due date, factoring in closed library due date management, is BEFORE the patron's expiration date, then the due date will be the end of the current service point hours OR the beginning of the next open service point hours (in other words, there's no change to the existing logic).