Bug 37707 - Lead/Trail times should work in combination
Summary: Lead/Trail times should work in combination
Status: ASSIGNED
Alias: None
Product: Koha
Classification: Unclassified
Component: Circulation (show other bugs)
Version: Main
Hardware: All All
: P5 - low enhancement
Assignee: Martin Renvoize (ashimema)
QA Contact: Testopia
URL:
Keywords:
: 39390 (view as bug list)
Depends on: 39584
Blocks:
  Show dependency treegraph
 
Reported: 2024-08-22 09:21 UTC by Martin Renvoize (ashimema)
Modified: 2025-09-15 20:51 UTC (History)
4 users (show)

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


Attachments
Bug 37707: First draft (17.33 KB, patch)
2025-05-22 06:48 UTC, Martin Renvoize (ashimema)
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Martin Renvoize (ashimema) 2024-08-22 09:21:24 UTC
Whilst working on the lead/trail time addition to bookings we discussed how they should affect things.

In the end we decided that they should work in combination when placing bookings so the window of unbookable time before a bookings should be the previous bookings 'trail' period + the current bookings 'lead' period.

I've run out of capacity to make that change in the aforementioned bug, so I'm splitting it out here to work on that as a expedient follow-up.

Lets get the core functionality in and then continue to polish it.

A- | TA >|< LB | -B- | TB >|< LC | -C
Comment 1 Martin Renvoize (ashimema) 2025-05-21 13:26:31 UTC
*** Bug 39390 has been marked as a duplicate of this bug. ***
Comment 2 Martin Renvoize (ashimema) 2025-05-22 06:48:35 UTC
Created attachment 182718 [details] [review]
Bug 37707: First draft

This patch adds calculation of pre and post booking days into the
disableDate function.

I'm not sure I like it for display yet, but functionally it works
Comment 3 Andrew Fuerste-Henry 2025-09-15 20:51:57 UTC
I can confirm this works as described -- bookings cannot be created such that the trailing time of one booking intersects with the leading time of the next. The interface grays out dates that cannot be selected and changes the mouse icon to a crossed-out-circle. Martin, what do you still feel is missing in the display here? Our libraries would love to see this functionality in Koha sooner rather than later.