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>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 4d3ebcbe69)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
This commit is contained in:
parent
11c0675696
commit
6a7bf9a8d5
|
|
@ -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>
|
||||
|
|
|
|||
Loading…
Reference in New Issue