Bug 36459 - Backdating checkouts on circ/circulation.pl not working properly
Summary: Backdating checkouts on circ/circulation.pl not working properly
Status: Pushed to main
Alias: None
Product: Koha
Classification: Unclassified
Component: Circulation (show other bugs)
Version: Main
Hardware: All All
: P5 - low normal (vote)
Assignee: Lucas Gass
QA Contact: Emily Lamancusa
URL:
Keywords:
Depends on: 18885 36494
Blocks:
  Show dependency treegraph
 
Reported: 2024-03-28 16:42 UTC by Lucas Gass
Modified: 2024-06-14 10:16 UTC (History)
5 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Trivial patch
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:
24.11.00


Attachments
Bug 36459: Do not set an empty flatpickr explicitly (1.48 KB, patch)
2024-05-23 16:38 UTC, Lucas Gass
Details | Diff | Splinter Review
Bug 36459: Do not set an empty flatpickr explicitly (1.53 KB, patch)
2024-05-23 19:47 UTC, David Nind
Details | Diff | Splinter Review
Bug 36459: Do not duplicate duedatespec IDs (1.87 KB, patch)
2024-06-12 19:41 UTC, Lucas Gass
Details | Diff | Splinter Review
Bug 36459: Do not duplicate duedatespec IDs (1.93 KB, patch)
2024-06-13 11:31 UTC, Owen Leonard
Details | Diff | Splinter Review
Bug 36459: Do not duplicate duedatespec IDs (2.00 KB, patch)
2024-06-13 17:26 UTC, Emily Lamancusa
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Lucas Gass 2024-03-28 16:42:26 UTC
To recreate: 

1. Go to circ/circulation.pl and check an item out to a patron.
2. Backdate it to sometime in the past using the "Specify due date (MM/DD/YYYY) : " input
3. A modal appears to "Please confirm checkout". The date is no longer populated in that field. 
4. You must add the date again here. 


This is due to Bug 18885.
Comment 1 Lucas Gass 2024-03-28 18:15:33 UTC
This highlights the fact that there are multiple '#duedatespec' on the same page.
Comment 2 Lucas Gass 2024-05-23 16:38:45 UTC Comment hidden (obsolete)
Comment 3 Lucas Gass 2024-05-23 16:41:15 UTC
(In reply to Lucas Gass from comment #1)
> This highlights the fact that there are multiple '#duedatespec' on the same
> page.

I didn't address this with my patch but we should do so.
Comment 4 David Nind 2024-05-23 19:47:03 UTC Comment hidden (obsolete)
Comment 5 Emily Lamancusa 2024-06-12 16:27:09 UTC
This does break 18885, I'm afraid:

1. Have OnSiteCheckouts enabled and OnSiteAutoCheck disabled
2. Go to circulation.pl
3. Check the checkbox for on-site checkout
--> The checkout date is auto-populated with today's date
4. Check out an item
--> When the page reloads, the checkbox is no longer checked, but the checkout date is still populated

In the use case you're aiming to fix here, though, on-site checkouts was never checked in the first place...so why is #duedatespec being cleared at all? I think there's something deeper going on here.
Comment 6 Lucas Gass 2024-06-12 16:39:55 UTC
(In reply to Emily Lamancusa from comment #5)
> This does break 18885, I'm afraid:
> 
> 1. Have OnSiteCheckouts enabled and OnSiteAutoCheck disabled
> 2. Go to circulation.pl
> 3. Check the checkbox for on-site checkout
> --> The checkout date is auto-populated with today's date
> 4. Check out an item
> --> When the page reloads, the checkbox is no longer checked, but the
> checkout date is still populated
> 
> In the use case you're aiming to fix here, though, on-site checkouts was
> never checked in the first place...so why is #duedatespec being cleared at
> all? I think there's something deeper going on here.

Are you sure? In my testing steps 1-4 only work when my patch from this bug is applied. Without this patch:

-I check the on-site checkbox, today's date is populated. 
-I checkout an item, both the checkbox and the due date is cleared

With my patch:
-I check the on-site checkbox, today's date is populated. 
-I checkout an item, the checkbox is cleared but the date remains.
Comment 7 Lucas Gass 2024-06-12 19:41:10 UTC
Created attachment 167676 [details] [review]
Bug 36459: Do not duplicate duedatespec IDs

To test;
1. Go to circ/circulation.pl and check an item out to a patron.
2. Backdate it to sometime in the past using the "Specify due date (MM/DD/YYYY) : " input
3. A modal appears to "Please confirm checkout". The date is no longer populated in that field.
4. You must add the date again here.
5. APPLY PATCH
6. Try again and this time the confimration date should be set correctly.
7. Follow the test plan from Bug 18885 to make sure on site checkouts still work correctly.
Comment 8 Lucas Gass 2024-06-12 19:41:50 UTC
Completely new patch, so resetting to NSO.
Comment 9 Owen Leonard 2024-06-13 11:31:39 UTC
Created attachment 167684 [details] [review]
Bug 36459: Do not duplicate duedatespec IDs

To test;
1. Go to circ/circulation.pl and check an item out to a patron.
2. Backdate it to sometime in the past using the "Specify due date
   (MM/DD/YYYY) : " input
3. A modal appears to "Please confirm checkout". The date is no longer
   populated in that field.
4. You must add the date again here.
5. APPLY PATCH
6. Try again and this time the confimration date should be set
   correctly.
7. Follow the test plan from Bug 18885 to make sure on site checkouts
   still work correctly.

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Comment 10 Emily Lamancusa 2024-06-13 17:26:33 UTC
Created attachment 167693 [details] [review]
Bug 36459: Do not duplicate duedatespec IDs

To test;
1. Go to circ/circulation.pl and check an item out to a patron.
2. Backdate it to sometime in the past using the "Specify due date
   (MM/DD/YYYY) : " input
3. A modal appears to "Please confirm checkout". The date is no longer
   populated in that field.
4. You must add the date again here.
5. APPLY PATCH
6. Try again and this time the confimration date should be set
   correctly.
7. Follow the test plan from Bug 18885 to make sure on site checkouts
   still work correctly.

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov>
Comment 11 Emily Lamancusa 2024-06-13 17:35:50 UTC
Thanks for the new patch and signoff! Looks good and works as expected. Passing QA
Comment 12 Martin Renvoize 2024-06-14 10:16:24 UTC
Thanks for all the hard work!

Pushed to main for the next 24.11.00 release as RM Assistant