@@ -, +, @@ AllowHoldsPolicyOverride is set - Pickup location, means a library that is marked as valid pickup location on its configuration. 'Item's home library' or 'Any'. The goal is to be able to differentiate when all libraries are returned, from the case only 'valid pickup locations' are returned. The easiest one is 'Item's home library'. an item that belongs to a library that doesn't match any of the valid ones. syspref) to change the pickup location for the hold valid ones, even though we should be able to override it. --- koha-tmpl/intranet-tmpl/prog/en/modules/reserve/request.tt | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) --- a/koha-tmpl/intranet-tmpl/prog/en/modules/reserve/request.tt +++ a/koha-tmpl/intranet-tmpl/prog/en/modules/reserve/request.tt @@ -1164,13 +1164,17 @@ this_dropdown.select2({ allowClear: false, ajax: { + [%- IF Koha.Preference('AllowHoldPolicyOverride') -%] + url: '/api/v1/libraries', + [%- ELSE -%] url: '/api/v1/holds/' + encodeURIComponent(hold_id) + '/pickup_locations', + [%- END -%] delay: 300, // wait 300 milliseconds before triggering the request dataType: 'json', data: function (params) { var search_term = (params.term === undefined) ? '' : params.term; var query = { - "q": JSON.stringify({"name":{"-like":search_term+'%'}}), + "q": JSON.stringify({"name":{"-like":search_term+'%'},"pickup_location":1}), "_order_by": "name" }; return query; --