Bug 18885 - When 'on-site checkout' was used, the 'Specify due date' should be emptied for next checkout unless OnSiteCheckoutAutoCheck
Summary: When 'on-site checkout' was used, the 'Specify due date' should be emptied fo...
Status: Pushed to stable
Alias: None
Product: Koha
Classification: Unclassified
Component: Circulation (show other bugs)
Version: Main
Hardware: All All
: P5 - low normal
Assignee: Thibaud Guillot (thibaud_g)
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks: 36494 36459
  Show dependency treegraph
 
Reported: 2017-06-30 09:41 UTC by Baptiste Wojtkowski (bwoj)
Modified: 2024-05-23 16:39 UTC (History)
7 users (show)

See Also:
Change sponsored?: ---
Patch complexity: ---
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:
24.05.00,23.11.06
Circulation function:


Attachments
Bug 18885: Specify due date behavior according to on-site checkbox (1.61 KB, patch)
2023-10-31 13:05 UTC, Thibaud Guillot (thibaud_g)
Details | Diff | Splinter Review
Bug 18885: Specify due date behavior according to on-site checkbox (1.65 KB, patch)
2023-12-05 14:22 UTC, Biblibre Sandboxes
Details | Diff | Splinter Review
Bug 18885: Specify due date behavior according to on-site checkbox (1.71 KB, patch)
2024-03-22 10:46 UTC, Kyle M Hall (khall)
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Baptiste Wojtkowski (bwoj) 2017-06-30 09:41:16 UTC
When you perform an onsite checkout, the next checkout is pre-setted as follows:
- Specify due date => today
- Onsite checkout => not checked

I don't think this is is a correct behaviour: according to me there are 3 solutions, but I don't know which is the best:
- Maintaining "onsite checkout" checked
- Don't change duedatespec in interface when onsite checout is clicked and process it in the intranet part
- Remove the duedatespec on the new checkout page loading

This part of the code is really hard for me since it were patched and re patched and I'm not sure of the expected behaviour of all lines, so I would like some expert opinion before coding a solution
Comment 1 Fridolin Somers 2017-06-30 09:54:23 UTC
Linked to Bug 10067 and Bug 16527
Comment 2 Katrin Fischer 2020-04-19 12:36:25 UTC
I believe a part of this bug has been fixed by making the onsite checkbox behaviour configurable with OnSiteCheckoutAutoCheck. 	

I'd describe the remaining bug like this:

When the specified due date was set automatically by checking the on-site checkbox and the OnSiteCheckoutAutoCheck is set to not keep the checkbox checked for the next checkout, the date should be empty out as well.

If we don't always keep the checkbox - we should not automatically keep the date either.
Comment 3 Thibaud Guillot (thibaud_g) 2023-10-31 13:05:15 UTC
Created attachment 158115 [details] [review]
Bug 18885: Specify due date behavior according to on-site checkbox

When a on-site checkout is performed a date is automatically added but
if you unchecked the date remains. Even with OnSiteCheckoutAutoCheck
syspref

Test plan:
1) Do an on-site checkout by clicking on checkbox and see date added
2) Unchecked and see that the date remains on input
3) Do another test with OnSiteCheckoutAutoCheck enabled
4) Apply this patch and repeat actions

Normally now its works correctly
Comment 4 Biblibre Sandboxes 2023-12-05 14:22:47 UTC
Created attachment 159585 [details] [review]
Bug 18885: Specify due date behavior according to on-site checkbox

When a on-site checkout is performed a date is automatically added but
if you unchecked the date remains. Even with OnSiteCheckoutAutoCheck
syspref

Test plan:
1) Do an on-site checkout by clicking on checkbox and see date added
2) Unchecked and see that the date remains on input
3) Do another test with OnSiteCheckoutAutoCheck enabled
4) Apply this patch and repeat actions

Normally now its works correctly

Signed-off-by: tuxayo <victor@tuxayo.net>
Comment 5 Victor Grousset/tuxayo 2023-12-05 14:23:56 UTC
It work :)
Comment 6 Kyle M Hall (khall) 2024-03-22 10:46:22 UTC
Created attachment 163692 [details] [review]
Bug 18885: Specify due date behavior according to on-site checkbox

When a on-site checkout is performed a date is automatically added but
if you unchecked the date remains. Even with OnSiteCheckoutAutoCheck
syspref

Test plan:
1) Do an on-site checkout by clicking on checkbox and see date added
2) Unchecked and see that the date remains on input
3) Do another test with OnSiteCheckoutAutoCheck enabled
4) Apply this patch and repeat actions

Normally now its works correctly

Signed-off-by: tuxayo <victor@tuxayo.net>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Comment 7 Katrin Fischer 2024-03-22 11:28:11 UTC
Pushed for 24.05!

Well done everyone, thank you!
Comment 8 Fridolin Somers 2024-05-22 14:10:00 UTC
Pushed to 23.11.x for 23.11.06
Comment 9 Lucas Gass (lukeg) 2024-05-23 14:53:27 UTC
Won't backport this to 23.05.x unless a fix for Bug 36459 is provided.
Comment 10 Lucas Gass (lukeg) 2024-05-23 16:39:46 UTC
(In reply to Lucas Gass from comment #9)
> Won't backport this to 23.05.x unless a fix for Bug 36459 is provided.

I provided a patch for Bug 36459 if anyone wants to test.