Bug 37345

Summary: Remember for session checkbox on checkout page not sticking
Product: Koha Reporter: Lucas Gass (lukeg) <lucas>
Component: CirculationAssignee: Lucas Gass (lukeg) <lucas>
Status: Pushed to oldstable --- QA Contact: Martin Renvoize (ashimema) <martin.renvoize>
Severity: normal    
Priority: P5 - low CC: cj.lynce, david, fridolin.somers, gmcharlt, kyle.m.hall, wainuiwitikapark
Version: Main   
Hardware: All   
OS: All   
See Also: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14787
Change sponsored?: --- Patch complexity: Trivial patch
Documentation contact: Documentation submission:
Text to go in the release notes:
This fixes the date in the "Specify due date" field if "Remember for session" is ticked (when checking out items to a patron). The date was not being remembered, and you had to select it again.
Version(s) released in:
24.11.00,24.05.02,23.11.07
Circulation function:
Attachments: Bug 37345: Make stickyduedate stick
Bug 37345: Only toggle_onsite_checkout() if OnSiteCheckoutAutoCheck is enabled
Bug 37345: Only toggle_onsite_checkout() if OnSiteCheckoutAutoCheck is enabled
Bug 37345: Only toggle_onsite_checkout() if OnSiteCheckoutAutoCheck is enabled

Description Lucas Gass (lukeg) 2024-07-12 13:21:30 UTC
To recreate:

1. Find an item to checkout and a patron to check out to.
2. Set a due manually: "Specify due date (MM/DD/YYYY):"
3. Before checking out click the "Remember for session:" checkbox. 
4. Check the item out.
5. The specific due date is not retained.
Comment 1 Lucas Gass (lukeg) 2024-07-12 13:45:35 UTC
Created attachment 168904 [details] [review]
Bug 37345: Make stickyduedate stick

To test:
1. Find an item to checkout and a patron to check out to.
2. Set a due manually: "Specify due date (MM/DD/YYYY):"
3. Before checking out click the "Remember for session:" checkbox.
4. Check the item out.
5. The specific due date is not retained.
6. APPLY PATCH
7. Try 1 -4 again, now the date should be sticking.
8. Turn on the OnSiteCheckouts system pref and make sure it still works
9. Turn on the  OnSiteCheckoutAutoCheck system pref and make sure the on-site checkbox is still checked after doing an on-site checkout.
Comment 2 David Nind 2024-07-14 22:41:06 UTC
For step 7, it is now retaining a date - but not the original date I selected.

Example:
1. Enter:
   - the barcode
   - expand the options for the field   
   - enter or select 07/31/2024
   - check the "Remember for session" tick box
   - click "Check out"
2. Note that the date is retained, however it is the current server system date (for me this was 07/14/2024, 23:59
Comment 3 Lucas Gass (lukeg) 2024-07-15 16:22:38 UTC
Created attachment 169010 [details] [review]
Bug 37345: Only toggle_onsite_checkout() if OnSiteCheckoutAutoCheck is enabled

To test:
1. Find an item to checkout and a patron to check out to.
2. Set a due manually: "Specify due date (MM/DD/YYYY):"
3. Before checking out click the "Remember for session:" checkbox.
4. Check the item out.
5. The specific due date is not retained.
6. APPLY PATCH
7. Try 1 -4 again, now the date should be sticking.
8. Turn on the OnSiteCheckouts system pref and make sure it still works
9. Turn on the  OnSiteCheckoutAutoCheck system pref and make sure the on-site checkbox is still checked after doing an on-site checkout.
Comment 4 David Nind 2024-07-17 04:21:23 UTC
Created attachment 169072 [details] [review]
Bug 37345: Only toggle_onsite_checkout() if OnSiteCheckoutAutoCheck is enabled

To test:
1. Find an item to checkout and a patron to check out to.
2. Set a due manually: "Specify due date (MM/DD/YYYY):"
3. Before checking out click the "Remember for session:" checkbox.
4. Check the item out.
5. The specific due date is not retained.
6. APPLY PATCH
7. Try 1 -4 again, now the date should be sticking.
8. Turn on the OnSiteCheckouts system pref and make sure it still works
9. Turn on the  OnSiteCheckoutAutoCheck system pref and make sure the on-site checkbox is still checked after doing an on-site checkout.

Signed-off-by: David Nind <david@davidnind.com>
Comment 5 David Nind 2024-07-17 04:22:08 UTC
I added my sign-off - now working as expected.

Thanks Lucas!
Comment 6 Martin Renvoize (ashimema) 2024-07-17 16:00:37 UTC
Matt does a nice thorough job of setting remember options in bug 14787, worth a look ;)
Comment 7 Martin Renvoize (ashimema) 2024-07-17 16:01:03 UTC
Created attachment 169097 [details] [review]
Bug 37345: Only toggle_onsite_checkout() if OnSiteCheckoutAutoCheck is enabled

To test:
1. Find an item to checkout and a patron to check out to.
2. Set a due manually: "Specify due date (MM/DD/YYYY):"
3. Before checking out click the "Remember for session:" checkbox.
4. Check the item out.
5. The specific due date is not retained.
6. APPLY PATCH
7. Try 1 -4 again, now the date should be sticking.
8. Turn on the OnSiteCheckouts system pref and make sure it still works
9. Turn on the  OnSiteCheckoutAutoCheck system pref and make sure the on-site checkbox is still checked after doing an on-site checkout.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 8 Martin Renvoize (ashimema) 2024-07-17 16:01:23 UTC
That said, this trivial bugfix is still important.

PQA
Comment 9 Katrin Fischer 2024-07-18 15:57:40 UTC
Pushed for 24.11!

Well done everyone, thank you!
Comment 10 Lucas Gass (lukeg) 2024-07-18 21:52:54 UTC
Backported to 24.05.x for upcoming 24.05.02
Comment 11 Fridolin Somers 2024-07-19 09:48:57 UTC
Pushed to 23.11.x for 23.11.07
Comment 12 Wainui Witika-Park 2024-09-17 03:31:07 UTC
Not backporting to 23.05.x unless requested