Bugzilla – Attachment 182448 Details for
Bug 39584
Booking post-processing time cuts into circulation period
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 39584: Include trailDays when calculating maxDate
Bug-39584-Include-trailDays-when-calculating-maxDa.patch (text/plain), 2.16 KB, created by
Martin Renvoize (ashimema)
on 2025-05-14 13:37:21 UTC
(
hide
)
Description:
Bug 39584: Include trailDays when calculating maxDate
Filename:
MIME Type:
Creator:
Martin Renvoize (ashimema)
Created:
2025-05-14 13:37:21 UTC
Size:
2.16 KB
patch
obsolete
>From 8d3b0f4d499a357b2ca7ead8ced601966dfae7b1 Mon Sep 17 00:00:00 2001 >From: Martin Renvoize <martin.renvoize@openfifth.co.uk> >Date: Wed, 14 May 2025 14:18:47 +0100 >Subject: [PATCH] Bug 39584: Include trailDays when calculating maxDate > >When enforcing the max booking period from the circulation rules, we >should not include booking post processing days. > >Our pre and post processing days handling looks for 'flatpickr-disabled' >and ensure processing days cannot overlap. When setting maxDate, >flatpickr will apply the flatpickr-disabled class to the next day to >prevent selection past the max date and as such our post-processing acts >in an inclusive manor. > >This patch updates our maxDate handler to increase then maximum target >by the trailDays setting to allow a full loan period. > >To test: >1. Set up two days of post-processing time in the circ rules for an item type. >2. Make that item type bookable. >3. Place a booking for an item from that item type. Note that the 2-days of > post-processing time are factored into the total number of days allowed > for the booking. For a 7-day circ period, the booking cannot be set for > 7 days; it is enforced to end at 5. >4. APPLY PATCH >5. Try the booking again, this time you should be able to select the full loan period for that item. >--- > koha-tmpl/intranet-tmpl/prog/js/modals/place_booking.js | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/js/modals/place_booking.js b/koha-tmpl/intranet-tmpl/prog/js/modals/place_booking.js >index 634cce0c36e..5b58be66375 100644 >--- a/koha-tmpl/intranet-tmpl/prog/js/modals/place_booking.js >+++ b/koha-tmpl/intranet-tmpl/prog/js/modals/place_booking.js >@@ -767,7 +767,7 @@ $("#placeBookingModal").on("show.bs.modal", function (e) { > > const maxDate = new Date(startDate.getTime()); > maxDate.setDate( >- maxDate.getDate() + totalIssueLength >+ maxDate.getDate() + totalIssueLength + parseInt(trailDays) > ); > > // Update the maxDate option of the flatpickr instance >-- >2.49.0
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 39584
:
181312
|
181394
|
182448
|
182451