Loans (UXPROD-788)

[CIRC-1626] Checkout allows "Change due date" to create a new due date/time earlier than the item checkout date/time Created: 27/Sep/22  Updated: 12/Oct/22  Resolved: 12/Oct/22

Status: Closed
Project: mod-circulation
Components: None
Affects versions: None
Fix versions: None
Parent: Loans

Type: Bug Priority: P2
Reporter: Erin Nettifee Assignee: Unassigned
Resolution: Won't Do Votes: 0
Labels: support
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original estimate: Not Specified

Issue links:
Relates
relates to UXPROD-3805 Bulk edit - loan due dates Draft
Sprint:
Development Team: Vega
Release: Nolana (R3 2022)
Epic Link: Loans
RCA Group: TBD

 Description   

Overview: Verified on a Lotus environment, and on Snapshot.

When a patron has an item on loan, FOLIO users can change the loan due date. FOLIO allows users to choose a due date that is before the item loan date.

This is likely to be user error, but FOLIO should stop this from occurring. If the date is mistakenly set to the past, it can trigger almost immediate overdue/lost notices to be sent to patrons, and then of course it also would cause issues with reporting.

Steps to Reproduce:

  1. Log into Snapshot as a user with permissions to check out items
  2. Find a patron and an item that can be loaned to the patron
  3. Go to Check out and check the item out to the patron
  4. From the successful loan in the "Scan items" pane, click the "..." menu and choose "Change due date"
  5. Choose a due date that is before the current day. The UI will warn you that the date is in the past.
  6. Click Save and close

Expected Results: FOLIO returns an error message that says that the due date cannot be changed
Actual Results: FOLIO changes the due date

Additional Information:
In looking at original specs for this feature, it appears this scenario was not accounted for (or at least, I cannot find a jira.)

https://folio-org.atlassian.net/browse/UIU-497
https://folio-org.atlassian.net/browse/UIU-1516

That means that the cause of this issue is likely "Missing/incomplete requirements".

Also, the API in Check out and Users uses a PUT to /circulation/loans rather than a POST to /circulation/loans/

{id}

/change-due-date and I don't know why.

Both Checkout and Users allow for changing loan due dates, but I am putting this into the back end module that I think is appropriate (mod-circulation) since this will also affect Bulk Edit ( UXPROD-3805 Draft ).

In an ideal scenario, the back-end API would handle this, but there are use cases where you would potentially need to set dates this way (e.g., bulk migration) and so this probably needs more discussion about how to address.

URL:
Interested parties: Magda Zacharska, for bulk edit awareness 



 Comments   
Comment by Erin Nettifee [ 27/Sep/22 ]

Stephanie Buck I filed this today - glad to chat more.

I think the issue here is that if you don't stop it, you can almost immediately generate notice policies to be delivered (so it makes the error super visible.)

Comment by Erin Nettifee [ 27/Sep/22 ]

Brooks noted over in the comments of https://folio-org.atlassian.net/browse/UXPROD-3805 that there are production use cases for creating loan records where the loan due date is earlier than the loan create date - particularly around migration workflows.

That raises some questions... I might flag this for discussion over in the data-migration channel.

Comment by Erin Nettifee [ 27/Sep/22 ]

Started thread here: https://folio-project.slack.com/archives/CB5BQFEK1/p1664296960422089

Comment by Brooks Travis [ 27/Sep/22 ]

Yeah, I'd argue that this is not a bug.

Comment by Stephanie Buck [ 11/Oct/22 ]

Erin Nettifee  & Brooks Travis, Alexander Kurash and Vega are under the impression that the idea was to be able to change a due date to one in the past. This ticket implies that the user should not be able to change a due date to a past date. Can you clarify? 

Comment by Erin Nettifee [ 12/Oct/22 ]

Hi Stephanie Buck. it's not that you can't change it to the past, but that you can't change it to a date before the item was checked out.

Scenario 1: item was checked out 9-1-2021, returned 12-30-2021, backdated to 11-1-2021 - that's OK, because then it looks like a loan from September 1 to November 1

Scenario 2: item was checked out 9-1-2021, returned 12-30-2021, backdated to 7-1-2021 - that's not OK because then it looks like a loan that was returned before it happened.

Having said all that, the Slack discussion and ensuing convos with Brooks point out that changing this has a data migration impact and it's definitely not the simple bug I impulsively thought it was. So I'm going to close this as "won't do" but the overall question will still need to be resolved, I think, in order to prevent potentially ugly errors on the Bulk Edit side.

Comment by Stephanie Buck [ 12/Oct/22 ]

Thanks, Erin Nettifee for the explanation and follow-up on this!

Generated at Fri Feb 09 00:35:04 UTC 2024 using Jira 1001.0.0-SNAPSHOT#100246-sha1:7a5c50119eb0633d306e14180817ddef5e80c75d.