]> git.koha-community.org Git - koha.git/commit
Bug 27697: Only preopulate search when we have found a single biblio
authorNick Clemens <nick@bywatersolutions.com>
Wed, 18 May 2022 15:08:39 +0000 (15:08 +0000)
committerLucas Gass <lucas@bywatersolutions.com>
Fri, 10 Jun 2022 16:37:59 +0000 (16:37 +0000)
commitc31ed9aaf124c866d14973b2deb6058197f3e64e
tree1425f4c36558010ba520b56fb846971a4b434811
parent0783b96359e392b95538a7aca78f263ae178e1ca
Bug 27697: Only preopulate search when we have found a single biblio

This patch uses the url parameter we created in 23475 to determine whether
we should populate the search bar or not

Note - a bookmark with this param will still populate search term with last search

To test:
1 - Search staff client for 'cat'
2 - Browse to a patrons checkouts and click on a title, or just go directly to a details page:
    http://localhost:8081/cgi-bin/koha/catalogue/detail.pl?biblionumber=2850
3 - Search bar says 'cat'
4 - Apply patch
5 - Repeat 1-2
6 - Search bar is not populated
7 - Search "dalek war box set" or a term that finds a single record in your instance
8 - Search bar is populated
9 - Note url like: http://localhost:8081/cgi-bin/koha/catalogue/detail.pl?biblionumber=2850&found1=1

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 022330b8d26b81e53f9c4af7798fa42ff48bdaa3)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
catalogue/detail.pl
koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt