Bugzilla – Attachment 117535 Details for
Bug 26247
Search terms retained in header search creates UX inconsistency
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 26247: Make retaining search terms in staff client optional
Bug-26247-Make-retaining-search-terms-in-staff-cli.patch (text/plain), 4.61 KB, created by
ByWater Sandboxes
on 2021-03-02 16:52:12 UTC
(
hide
)
Description:
Bug 26247: Make retaining search terms in staff client optional
Filename:
MIME Type:
Creator:
ByWater Sandboxes
Created:
2021-03-02 16:52:12 UTC
Size:
4.61 KB
patch
obsolete
>From 74a2433a7683952d83407da283ffe662520caaf1 Mon Sep 17 00:00:00 2001 >From: Nick Clemens <nick@bywatersolutions.com> >Date: Sun, 28 Feb 2021 14:39:53 +0000 >Subject: [PATCH] Bug 26247: Make retaining search terms in staff client > optional > >This patch adds a new system preference 'StaffRetainSearchTerms' - if enabled >header searches will be retained on the results page as current behvaiour. If disabled >the search box will be empty after searching > >To test: >1 - Search in staff client from header >2 - Confirm search terms are retained >3 - Apply patch, update database >4 - Search again, terms still retained >5 - Disable StaffRetainSearchTerms preference >6 - Search again >7 - Search box is cleared > >Signed-off-by: Sally <sally.healey@cheshiresharedservices.gov.uk> >--- > catalogue/search.pl | 4 ++-- > installer/data/mysql/mandatory/sysprefs.sql | 1 + > installer/data/mysql/updatedatabase.pl | 1 - > .../intranet-tmpl/prog/en/modules/admin/preferences/searching.pref | 7 +++++++ > 4 files changed, 10 insertions(+), 3 deletions(-) > >diff --git a/catalogue/search.pl b/catalogue/search.pl >index 1419759c85..ddcfcf2a12 100755 >--- a/catalogue/search.pl >+++ b/catalogue/search.pl >@@ -362,8 +362,8 @@ if ($indexes[0] && (!$indexes[1] || $params->{'scan'})) { > # an operand can be a single term, a phrase, or a complete ccl query > my @operands = map uri_unescape($_), $cgi->multi_param('q'); > >-# if a simple search, display the value in the search box >-if ($operands[0] && !$operands[1]) { >+# if a simple search and StaffRetainSearchTerms, display the value in the search box >+if (C4::Context->preference('StaffRetainSearchTerms') && $operands[0] && !$operands[1]) { > my $ms_query = $operands[0]; > $ms_query =~ s/ #\S+//; > $template->param(ms_value => $ms_query); >diff --git a/installer/data/mysql/mandatory/sysprefs.sql b/installer/data/mysql/mandatory/sysprefs.sql >index e68c4c3a52..d20597566e 100644 >--- a/installer/data/mysql/mandatory/sysprefs.sql >+++ b/installer/data/mysql/mandatory/sysprefs.sql >@@ -623,6 +623,7 @@ INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` > ('StaffDetailItemSelection', '1', NULL, 'Enable item selection in record detail page', 'YesNo'), > ('StaffLangSelectorMode','footer','top|both|footer','Select the location to display the language selector in staff interface','Choice'), > ('StaffLoginInstructions', '', NULL, 'HTML to go into the login box for the staff interface','Free'), >+('StaffRetainSearchTerms', '1', NULL, 'If enabled, searches entered into the search bar will be retained', 'YesNo'), > ('StaffSearchResultsDisplayBranch','holdingbranch','holdingbranch|homebranch','Controls the display of the home or holding branch for staff search results','Choice'), > ('StaffSerialIssueDisplayCount','3','','Number of serial issues to display per subscription in the staff interface','Integer'), > ('StaticHoldsQueueWeight','0',NULL,'Specify a list of library location codes separated by commas -- the list of codes will be traversed and weighted with first values given higher weight for holds fulfillment -- alternatively, if RandomizeHoldsQueueWeight is set, the list will be randomly selective','Integer'), >diff --git a/installer/data/mysql/updatedatabase.pl b/installer/data/mysql/updatedatabase.pl >index 55e8ec9396..23ad51fcc6 100755 >--- a/installer/data/mysql/updatedatabase.pl >+++ b/installer/data/mysql/updatedatabase.pl >@@ -23255,7 +23255,6 @@ if( CheckVersion( $DBversion ) ) { > $DBversion = '20.06.00.063'; > if( CheckVersion( $DBversion ) ) { > $dbh->do(q{INSERT IGNORE INTO circulation_rules (branchcode, categorycode, itemtype, rule_name, rule_value) VALUES (NULL, NULL, NULL, 'decreaseloanholds', NULL) }); >- > NewVersion( $DBversion, 14866, "Add decreaseloanholds circulation rule" ); > } > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/searching.pref b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/searching.pref >index eaaf56344b..fc40ab7b52 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/searching.pref >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/searching.pref >@@ -261,6 +261,13 @@ Searching: > no: "don't search" > - on all variations of the ISBN. > - >+ - When searching from the header in the staff client >+ - pref: StaffRetainSearchTerms >+ choices: >+ yes: "retain" >+ no: "don't retain" >+ - search terms between searches. >+ - > - pref: BiblioItemtypeInfo > choices: > yes: "Display" >-- >2.11.0
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 26247
:
117408
|
117409
|
117410
|
117411
|
117461
|
117535
|
117536
|
117537
|
117538
|
117539
|
120353
|
120354
|
120355
|
120356
|
120357
|
120358
|
120359
|
120360
|
136683
|
136767
|
137310
|
138478
|
140473
|
140474