Bugzilla – Attachment 185599 Details for
Bug 39072
Item search shareable link adding selections for similar LOC auth values
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 39072: Only select exact matches when populating search terms
Bug-39072-Only-select-exact-matches-when-populatin.patch (text/plain), 2.35 KB, created by
Brendan Lawlor
on 2025-08-20 16:44:57 UTC
(
hide
)
Description:
Bug 39072: Only select exact matches when populating search terms
Filename:
MIME Type:
Creator:
Brendan Lawlor
Created:
2025-08-20 16:44:57 UTC
Size:
2.35 KB
patch
obsolete
>From e32507b6d2693364cba2cd505209241578401585 Mon Sep 17 00:00:00 2001 >From: Nick Clemens <nick@bywatersolutions.com> >Date: Thu, 14 Aug 2025 13:11:53 +0000 >Subject: [PATCH] Bug 39072: Only select exact matches when populating search > terms > >This patch simply reduces our matching pattern to ensure the string is an exact match, rather than partial > >To test: >- Create LOC authorized values of ADULT with description "Adult" and ADULTG with description "Adult - Grab and Go" >- Find a record with items and set one item to shelving location "Adult" >- Find a second record with items and set one item to shelving location "Adult - Grab and Go" >- Create an Item Search for Shelving location and select 'Adult' only >- Search and get one result from the record selected above >- Click Copy shareable link and paste/go in new tab >- See that the results now include both records from above >- Click Edit search button and notice that the Shelving location 'Adult - Grab and Go' was added to the selected criteria for the search >- Apply patch >- Repeat original search for 'Adult' location >- Click 'Copy shareable link' >- Open in new tab and confirm correct results >- Repeat with a search for 'Adult - Grab and Go' and confirm shareable link gets the correct results > >Signed-off-by: Brendan Lawlor <blawlor@clamsnet.org> >--- > koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/itemsearch.tt | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/itemsearch.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/itemsearch.tt >index a050fdf52e..57b367261d 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/itemsearch.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/itemsearch.tt >@@ -80,7 +80,7 @@ > <option value="" selected="selected"> [% IF (empty_option) %][% INCLUDE form_label label=empty_option %][% ELSE %]<span>All</span>[% END %] </option> > [% END %] > [% FOREACH option IN options %] >- [% IF query.param(name).grep(option.value).size %] >+ [% IF query.param(name).grep('^' _ option.value _ '$').size %] > <option value="[% option.value | html %]" selected="selected">[% option.label | html %]</option> > [% ELSE %] > <option value="[% option.value | html %]">[% option.label | html %]</option> >-- >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 39072
:
185393
| 185599