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)
committerArthur Suzuki <arthur.suzuki@biblibre.com>
Tue, 21 Jun 2022 13:33:54 +0000 (15:33 +0200)
commit7fa8d2341b3b1d0e85dbf57c1a791b6831235340
tree3620181586851547936008066676acf0afdb663b
parent994868be66f808d6d98ffdce3e46e233fd751712
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>
(cherry picked from commit c31ed9aaf124c866d14973b2deb6058197f3e64e)
Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
catalogue/detail.pl
koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt