Bug 39692 - With OnSiteCheckoutsForce the due date should be set
Summary: With OnSiteCheckoutsForce the due date should be set
Status: Pushed to main
Alias: None
Product: Koha
Classification: Unclassified
Component: Circulation (show other bugs)
Version: Main
Hardware: All All
: P5 - low minor
Assignee: Janusz Kaczmarek
QA Contact: Baptiste Wojtkowski (bwoj)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2025-04-19 15:26 UTC by Janusz Kaczmarek
Modified: 2025-05-02 06:55 UTC (History)
3 users (show)

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


Attachments
Bug 39692: With OnSiteCheckoutsForce the due date should be set (3.25 KB, patch)
2025-04-19 15:38 UTC, Janusz Kaczmarek
Details | Diff | Splinter Review
Bug 39692: With OnSiteCheckoutsForce the due date should be set (3.31 KB, patch)
2025-04-19 16:33 UTC, Roman Dolny
Details | Diff | Splinter Review
Bug 39692: With OnSiteCheckoutsForce the due date should be set (3.37 KB, patch)
2025-04-29 13:08 UTC, Baptiste Wojtkowski (bwoj)
Details | Diff | Splinter Review
Bug 39692: [23.11] With OnSiteCheckoutsForce the due date should be set (3.64 KB, patch)
2025-04-29 13:36 UTC, Baptiste Wojtkowski (bwoj)
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Janusz Kaczmarek 2025-04-19 15:26:56 UTC
When OnSiteCheckoutsForce is set it is possible to on-site checkout an item to a restricted patron. But the due data that is labelled with "Automatic due date:" is not being set. As a result, when such a checkout is performed and you do not set the date manually, the due date will be set as for normal checkout (even if it is marked as on-site checkout).
Comment 1 Janusz Kaczmarek 2025-04-19 15:38:34 UTC
Created attachment 181212 [details] [review]
Bug 39692: With OnSiteCheckoutsForce the due date should be set

When OnSiteCheckoutsForce is set it is possible to on-site checkout an
item to a restricted patron. But the due data that is labelled with
"Automatic due date:" is not being set. As a result, when such a
checkout is performed and you do not set the date manually, the due
date will be set as for normal checkout (even if it is marked as
on-site checkout).

Test plan:
==========
1. Enable OnSiteCheckouts and OnSiteCheckoutsForce; manually restrict
   a patron.
2. Go to checkout page for this patron. You will notice:
   "On-site checkouts only. Automatic due date:" with an empty input
   field for the date. Perform the checkout (pick any existing
   barcode).
   Note the due date in patron's checkouts. In standard ktd it will be
   +5 days from today, as for a regular checkuot (cf. Circulation and
   fine rules) and the checkout will be marked as on-site checkout.
3. Apply the patch ; restart_all.
4. Repeat p. 2 (with another barcode or after checking-in). The date
   in the date input field should be set to today's date and after
   performing the checkout the sue date should also be set to
   the current date.
Comment 2 Roman Dolny 2025-04-19 16:33:59 UTC
Created attachment 181213 [details] [review]
Bug 39692: With OnSiteCheckoutsForce the due date should be set

When OnSiteCheckoutsForce is set it is possible to on-site checkout an
item to a restricted patron. But the due data that is labelled with
"Automatic due date:" is not being set. As a result, when such a
checkout is performed and you do not set the date manually, the due
date will be set as for normal checkout (even if it is marked as
on-site checkout).

Test plan:
==========
1. Enable OnSiteCheckouts and OnSiteCheckoutsForce; manually restrict
   a patron.
2. Go to checkout page for this patron. You will notice:
   "On-site checkouts only. Automatic due date:" with an empty input
   field for the date. Perform the checkout (pick any existing
   barcode).
   Note the due date in patron's checkouts. In standard ktd it will be
   +5 days from today, as for a regular checkuot (cf. Circulation and
   fine rules) and the checkout will be marked as on-site checkout.
3. Apply the patch ; restart_all.
4. Repeat p. 2 (with another barcode or after checking-in). The date
   in the date input field should be set to today's date and after
   performing the checkout the sue date should also be set to
   the current date.

Signed-off-by: Roman Dolny <roman.dolny@jezuici.pl>
Comment 3 Baptiste Wojtkowski (bwoj) 2025-04-29 13:08:16 UTC
Created attachment 181653 [details] [review]
Bug 39692: With OnSiteCheckoutsForce the due date should be set

When OnSiteCheckoutsForce is set it is possible to on-site checkout an
item to a restricted patron. But the due data that is labelled with
"Automatic due date:" is not being set. As a result, when such a
checkout is performed and you do not set the date manually, the due
date will be set as for normal checkout (even if it is marked as
on-site checkout).

Test plan:
==========
1. Enable OnSiteCheckouts and OnSiteCheckoutsForce; manually restrict
   a patron.
2. Go to checkout page for this patron. You will notice:
   "On-site checkouts only. Automatic due date:" with an empty input
   field for the date. Perform the checkout (pick any existing
   barcode).
   Note the due date in patron's checkouts. In standard ktd it will be
   +5 days from today, as for a regular checkuot (cf. Circulation and
   fine rules) and the checkout will be marked as on-site checkout.
3. Apply the patch ; restart_all.
4. Repeat p. 2 (with another barcode or after checking-in). The date
   in the date input field should be set to today's date and after
   performing the checkout the sue date should also be set to
   the current date.

Signed-off-by: Roman Dolny <roman.dolny@jezuici.pl>
Signed-off-by: Baptiste Wojtkowski <baptiste.wojtkowski@biblibre.com>
Comment 4 Baptiste Wojtkowski (bwoj) 2025-04-29 13:11:24 UTC
Yup, that makes no sense to have a default value different from 0 days I think. Patch small and clean. PQA.
Comment 5 Baptiste Wojtkowski (bwoj) 2025-04-29 13:36:35 UTC
Created attachment 181660 [details] [review]
Bug 39692: [23.11] With OnSiteCheckoutsForce the due date should be set

When OnSiteCheckoutsForce is set it is possible to on-site checkout an
item to a restricted patron. But the due data that is labelled with
"Automatic due date:" is not being set. As a result, when such a
checkout is performed and you do not set the date manually, the due
date will be set as for normal checkout (even if it is marked as
on-site checkout).

Test plan:
==========
1. Enable OnSiteCheckouts and OnSiteCheckoutsForce; manually restrict
   a patron.
2. Go to checkout page for this patron. You will notice:
   "On-site checkouts only. Automatic due date:" with an empty input
   field for the date. Perform the checkout (pick any existing
   barcode).
   Note the due date in patron's checkouts. In standard ktd it will be
   +5 days from today, as for a regular checkuot (cf. Circulation and
   fine rules) and the checkout will be marked as on-site checkout.
3. Apply the patch ; restart_all.
4. Repeat p. 2 (with another barcode or after checking-in). The date
   in the date input field should be set to today's date and after
   performing the checkout the sue date should also be set to
   the current date.

Signed-off-by: Roman Dolny <roman.dolny@jezuici.pl>
Signed-off-by: Baptiste Wojtkowski <baptiste.wojtkowski@biblibre.com>
Comment 6 Baptiste Wojtkowski (bwoj) 2025-04-29 13:38:21 UTC
The 23.11 patch might not be necessary. The code has moved but it is very similar to the old one.
Comment 7 Katrin Fischer 2025-05-02 06:55:20 UTC
Pushed for 25.05!

Well done everyone, thank you!