Summary: | On-site checkout due date wrong if SpecifyDueDate is disabled | ||
---|---|---|---|
Product: | Koha | Reporter: | Owen Leonard <oleonard> |
Component: | Circulation | Assignee: | Jonathan Druart <jonathan.druart> |
Status: | CLOSED FIXED | QA Contact: | Testopia <testopia> |
Severity: | blocker | ||
Priority: | P5 - low | CC: | gmcharlt, jonathan.druart, kyle.m.hall, mirko, tomascohen |
Version: | Main | ||
Hardware: | All | ||
OS: | All | ||
Change sponsored?: | --- | Patch complexity: | Small patch |
Documentation contact: | Documentation submission: | ||
Text to go in the release notes: | Version(s) released in: | ||
Circulation function: | |||
Bug Depends on: | 10860 | ||
Bug Blocks: | |||
Attachments: |
Bug 13255: On-site checkout due date wrong if SpecifyDueDate is disabled
Bug 13255: On-site checkout due date wrong if SpecifyDueDate is disabled [PASSED QA] Bug 13255: On-site checkout due date wrong if SpecifyDueDate is disabled |
Description
Owen Leonard
2014-11-14 13:42:07 UTC
Tying the on-site checkout due date to the template doesn't look like it can work if the SpecifyDueDate preference is turned off. circulation.pl won't even consider the date which gets passed if SpecifyDueDate is off: circulation.pl line 160: my $duedatespec_allow = C4::Context->preference('SpecifyDueDate'); if($duedatespec_allow){ if ($duedatespec) { if ($duedatespec =~ C4::Dates->regexp('syspref')) { $datedue = dt_from_string($duedatespec); Because of this it's probably better to calculate the custom due date for on-site checkouts in circulation.pl based on the onsite_checkout checkbox value. Created attachment 33578 [details] [review] Bug 13255: On-site checkout due date wrong if SpecifyDueDate is disabled If you have the SpecifyDueDate preference disabled and check something out as an on-site checkout the due date seems to follow the default circulation rule rather than restricted the checkout to that day. Test plan: 0/ Disable SpecifyDueDate and enable OnSiteCheckouts 1/ Check an item out to a patron and check the 'On-site checkout' checkbox 2/ Verify (screen and DB) that the due date is correct (today 23:59) Created attachment 33690 [details] [review] Bug 13255: On-site checkout due date wrong if SpecifyDueDate is disabled If you have the SpecifyDueDate preference disabled and check something out as an on-site checkout the due date seems to follow the default circulation rule rather than restricted the checkout to that day. Test plan: 0/ Disable SpecifyDueDate and enable OnSiteCheckouts 1/ Check an item out to a patron and check the 'On-site checkout' checkbox 2/ Verify (screen and DB) that the due date is correct (today 23:59) Signed-off-by: Mirko Tietgen <mirko@abunchofthings.net> Created attachment 33695 [details] [review] [PASSED QA] Bug 13255: On-site checkout due date wrong if SpecifyDueDate is disabled If you have the SpecifyDueDate preference disabled and check something out as an on-site checkout the due date seems to follow the default circulation rule rather than restricted the checkout to that day. Test plan: 0/ Disable SpecifyDueDate and enable OnSiteCheckouts 1/ Check an item out to a patron and check the 'On-site checkout' checkbox 2/ Verify (screen and DB) that the due date is correct (today 23:59) Signed-off-by: Mirko Tietgen <mirko@abunchofthings.net> Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de> Works as described, passes tests and QA script. Patch pushed to master. Thanks Jonathan! |