Bugzilla – Attachment 176924 Details for
Bug 37618
Select patron's, then item's home library by default for pickup location when creating bookings
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 37618: (follow-up) Prevent setting of incorrect default if no filtered pickup locations available
Bug-37618-follow-up-Prevent-setting-of-incorrect-d.patch (text/plain), 1.51 KB, created by
Paul Derscheid
on 2025-01-22 17:23:47 UTC
(
hide
)
Description:
Bug 37618: (follow-up) Prevent setting of incorrect default if no filtered pickup locations available
Filename:
MIME Type:
Creator:
Paul Derscheid
Created:
2025-01-22 17:23:47 UTC
Size:
1.51 KB
patch
obsolete
>From bae5463227d20fdd1e06ba67e891d476a730eeae Mon Sep 17 00:00:00 2001 >From: Paul Derscheid <paul.derscheid@lmscloud.de> >Date: Wed, 22 Jan 2025 17:21:45 +0000 >Subject: [PATCH] Bug 37618: (follow-up) Prevent setting of incorrect default > if no filtered pickup locations available > >--- > .../intranet-tmpl/prog/js/modals/place_booking.js | 10 +++++++++- > 1 file changed, 9 insertions(+), 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 288419cfc9..6295745285 100644 >--- a/koha-tmpl/intranet-tmpl/prog/js/modals/place_booking.js >+++ b/koha-tmpl/intranet-tmpl/prog/js/modals/place_booking.js >@@ -212,7 +212,15 @@ $("#placeBookingModal").on("show.bs.modal", function (e) { > > $pickupSelect.prop("disabled", false); > >- // If filtered_pickup_locations contain the booking_patron's home library, use it as the default for pickup_library_id >+ /* If there are no filtered_pickup_locations, clear the picker >+ * and return early without trying to set a default. */ >+ if (!filtered_pickup_locations.length && !pickup_library_id) { >+ $pickupSelect.val(null).trigger("change"); >+ return; >+ } >+ >+ /* If filtered_pickup_locations contain the booking_patron's home library, >+ * use it as the default for pickup_library_id. */ > pickup_library_id ??= filtered_pickup_locations.find( > pickup_location => > pickup_location.library_id === >-- >2.39.5
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 37618
:
170235
|
171384
|
171394
|
171395
|
173155
|
173156
|
173157
|
176924
|
180469
|
180470
|
180471
|
180472