Bug 36175 - Checking out items that are booked doesn't quite work
Summary: Checking out items that are booked doesn't quite work
Status: RESOLVED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Circulation (show other bugs)
Version: Main
Hardware: All All
: P5 - low blocker (vote)
Assignee: Martin Renvoize
QA Contact: Marcel de Rooy
URL:
Keywords:
Depends on: 29002
Blocks:
  Show dependency treegraph
 
Reported: 2024-02-27 14:00 UTC by Kelly McElligott
Modified: 2024-03-20 14:56 UTC (History)
6 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.05.00,23.11.04


Attachments
Bug 36175: Corrections to reduced due for booked items (4.60 KB, patch)
2024-02-29 11:34 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 36175: Corrections to reduced due for booked items (4.65 KB, patch)
2024-02-29 13:23 UTC, ByWater Sandboxes
Details | Diff | Splinter Review
Bug 36175: Corrections to reduced due for booked items (4.74 KB, patch)
2024-03-01 08:13 UTC, Marcel de Rooy
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Kelly McElligott 2024-02-27 14:00:14 UTC
At the moment, if an item is currently "booked" and that item is attempted to be checked out which would cause the due date to be during the 'booked' period, there is a box to edit the date of the due date, which is locked.
Process to test:
1. Make an item booked from 3/3/2024-3/9/2024
2. Go to check out this item to another patron, the circulation period of the item type is 2 weeks.
3. Koha presents a box which tells staff that this item is booked, provides a locked date picker and two other options, checkout - yes /no.
4. Since the date picker is locked, no new date can be used to still check out the item to the patron with a smaller circulation period.
5. if Choose Yes, the item is checked out with a regular circulation period, totally ignoring the booking.


The date picker should not be locked, staff should be able to checkout the item and give the item a different due date. (I tested using a SuperLibrarian Permission)
Comment 1 Martin Renvoize 2024-02-29 11:34:53 UTC
Created attachment 162591 [details] [review]
Bug 36175: Corrections to reduced due for booked items

This patch fixes a mistake in the circulation controller such that the
proper reduceddue date is passed to the template when a checkout would
overlap with a booking.

I also take the oportunity to enhance the functionality to allow
librarians to set their own reduceddue date between now and the hard
reduceddue as required for the existing booking.

Test plan
1) Set an item to 'bookable'
2) Add a booking to that item for user A for a few days time.
3) Attempt to checkout the item to user B and note the warning that
   the item is booked for another user.
4) With the patch applied, a reduced due date of 1 day prior to the
   booking should be defaulted to in the displayed date picker.
5) You should be able to select any date between today and the day
   before the booking starts
6) Confirm you can checkout with the reduceddue date set.
7) Bonus point, confirm the field is required, so if you try to wipe it
   and then checkout, you will be blocked.
Comment 2 ByWater Sandboxes 2024-02-29 13:23:58 UTC
Created attachment 162598 [details] [review]
Bug 36175: Corrections to reduced due for booked items

This patch fixes a mistake in the circulation controller such that the
proper reduceddue date is passed to the template when a checkout would
overlap with a booking.

I also take the oportunity to enhance the functionality to allow
librarians to set their own reduceddue date between now and the hard
reduceddue as required for the existing booking.

Test plan
1) Set an item to 'bookable'
2) Add a booking to that item for user A for a few days time.
3) Attempt to checkout the item to user B and note the warning that
   the item is booked for another user.
4) With the patch applied, a reduced due date of 1 day prior to the
   booking should be defaulted to in the displayed date picker.
5) You should be able to select any date between today and the day
   before the booking starts
6) Confirm you can checkout with the reduceddue date set.
7) Bonus point, confirm the field is required, so if you try to wipe it
   and then checkout, you will be blocked.

Signed-off-by: Kelly <kelly@bywatersolutions.com>
Comment 3 Marcel de Rooy 2024-03-01 08:13:34 UTC
Created attachment 162642 [details] [review]
Bug 36175: Corrections to reduced due for booked items

This patch fixes a mistake in the circulation controller such that the
proper reduceddue date is passed to the template when a checkout would
overlap with a booking.

I also take the oportunity to enhance the functionality to allow
librarians to set their own reduceddue date between now and the hard
reduceddue as required for the existing booking.

Test plan
1) Set an item to 'bookable'
2) Add a booking to that item for user A for a few days time.
3) Attempt to checkout the item to user B and note the warning that
   the item is booked for another user.
4) With the patch applied, a reduced due date of 1 day prior to the
   booking should be defaulted to in the displayed date picker.
5) You should be able to select any date between today and the day
   before the booking starts
6) Confirm you can checkout with the reduceddue date set.
7) Bonus point, confirm the field is required, so if you try to wipe it
   and then checkout, you will be blocked.

Signed-off-by: Kelly <kelly@bywatersolutions.com>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Comment 4 Katrin Fischer 2024-03-07 15:38:12 UTC
Pushed for 24.05!

Well done everyone, thank you!
Comment 5 Fridolin Somers 2024-03-11 09:49:40 UTC
Pushed to 23.11.x for 23.11.04
Comment 6 Lucas Gass 2024-03-19 15:38:23 UTC
Missing 23.05.x dependencies, no backport.