Bug 26247 - Search terms retained in header search creates UX inconsistency
Summary: Search terms retained in header search creates UX inconsistency
Status: Pushed to master
Alias: None
Product: Koha
Classification: Unclassified
Component: Searching (show other bugs)
Version: unspecified
Hardware: All All
: P5 - low major with 4 votes (vote)
Assignee: Nick Clemens
QA Contact: Martin Renvoize
URL:
Keywords:
: 28401 (view as bug list)
Depends on: 14189 19046 23475 28356
Blocks: 31967
  Show dependency treegraph
 
Reported: 2020-08-19 03:41 UTC by David Cook
Modified: 2022-10-25 06:28 UTC (History)
18 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Small patch
Documentation contact:
Documentation submission:
Text to go in the release notes:
This fixes usability and consistency issues with the staff interface search header. Retaining or clearing search terms between searches is now configurable using two new system preferences - RetainCatalogSearchTerms (for searching the catalog) and RetainPatronsSearchTerms (for check out and searching patrons). Previously, search terms were retained when 1) searching the catalog and then switching to check out, check in, or renew 2) searching from the check out or search patrons and then switching to check in, renew and search catalog. This then required manually clearing the input field.
Version(s) released in:
22.11.00


Attachments
Bug 26247: Make retaining search terms in staff client optional (4.55 KB, patch)
2021-02-28 16:30 UTC, Nick Clemens
Details | Diff | Splinter Review
Bug 26247: Consolidate search box code (20.53 KB, patch)
2021-02-28 16:30 UTC, Nick Clemens
Details | Diff | Splinter Review
Bug 26247: Only copy header inputs if marked sticky (27.48 KB, patch)
2021-02-28 16:30 UTC, Nick Clemens
Details | Diff | Splinter Review
Bug 26247: Make search terms optionally sticky (4.24 KB, patch)
2021-02-28 16:30 UTC, Nick Clemens
Details | Diff | Splinter Review
Bug 26247: Atomic update (1.17 KB, patch)
2021-03-01 16:40 UTC, Nick Clemens
Details | Diff | Splinter Review
Bug 26247: Make retaining search terms in staff client optional (4.61 KB, patch)
2021-03-02 16:52 UTC, ByWater Sandboxes
Details | Diff | Splinter Review
Bug 26247: Consolidate search box code (20.59 KB, patch)
2021-03-02 16:52 UTC, ByWater Sandboxes
Details | Diff | Splinter Review
Bug 26247: Only copy header inputs if marked sticky (27.54 KB, patch)
2021-03-02 16:52 UTC, ByWater Sandboxes
Details | Diff | Splinter Review
Bug 26247: Make search terms optionally sticky (4.31 KB, patch)
2021-03-02 16:52 UTC, ByWater Sandboxes
Details | Diff | Splinter Review
Bug 26247: Atomic update (1.24 KB, patch)
2021-03-02 16:52 UTC, ByWater Sandboxes
Details | Diff | Splinter Review
Bug 26247: Make retaining search terms in staff client optional (4.61 KB, patch)
2021-05-02 15:45 UTC, Katrin Fischer
Details | Diff | Splinter Review
Bug 26247: Consolidate search box code (20.59 KB, patch)
2021-05-02 15:45 UTC, Katrin Fischer
Details | Diff | Splinter Review
Bug 26247: Only copy header inputs if marked sticky (27.55 KB, patch)
2021-05-02 15:45 UTC, Katrin Fischer
Details | Diff | Splinter Review
Bug 26247: Make search terms optionally sticky (4.30 KB, patch)
2021-05-02 15:45 UTC, Katrin Fischer
Details | Diff | Splinter Review
Bug 26247: Atomic update (1.24 KB, patch)
2021-05-02 15:45 UTC, Katrin Fischer
Details | Diff | Splinter Review
Bug 26247: (QA follow-up) Fix tab chars (1.57 KB, patch)
2021-05-02 15:45 UTC, Katrin Fischer
Details | Diff | Splinter Review
Bug 26247: (QA follow-up) Fix 0/1 and terminology in preferences (1.66 KB, patch)
2021-05-02 15:45 UTC, Katrin Fischer
Details | Diff | Splinter Review
Bug 26247: (QA follow-up) Move prefs from Search > Results display to Search > Search form (2.25 KB, patch)
2021-05-02 15:46 UTC, Katrin Fischer
Details | Diff | Splinter Review
Bug 26247: Adding two Sysprefs for Search Terms (8.80 KB, patch)
2022-06-28 14:01 UTC, Florian
Details | Diff | Splinter Review
Bug 26247: [ALTERNATE] Adding 2 Sysprefs for Search Terms (8.42 KB, patch)
2022-06-30 08:39 UTC, Florian
Details | Diff | Splinter Review
Bug 26247: [ALTERNATE] Adding 2 Sysprefs for Search Terms (8.46 KB, patch)
2022-07-07 13:54 UTC, David Nind
Details | Diff | Splinter Review
Bug 26247: [ALTERNATE] Adding 2 Sysprefs for Search Terms (8.49 KB, patch)
2022-08-01 15:49 UTC, Nick Clemens
Details | Diff | Splinter Review
Bug 26247: Adding 2 Sysprefs for Search Terms (9.33 KB, patch)
2022-09-12 16:10 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 26247: (QA follow-up) Merge DB Updates (3.47 KB, patch)
2022-09-12 16:10 UTC, Martin Renvoize
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description David Cook 2020-08-19 03:41:40 UTC
If you type "test" in "Search the catalog" and click "Submit", the search term will be retained in the box.

This means if you do a search and then want to scan a barcode into "Check out", "Check in", or "Renew", you first have to manually clear the search terms.

This is inconsistent with how the header search boxes work overall. For instance, if you do a "Check out", it doesn't retain the value used to search. 

Either the search terms shouldn't be retained after a catalog search (change introduced in Bug 19046), or the text shouldn't be copied from that tab to other tabs.
Comment 1 Lucas Gass 2021-02-24 22:37:38 UTC
I will say the search terms being retained after a catalog search has been pretty unpopular among librarians. As a standard workflow might include scanning barcode after barcode. Stopping to clear the search out between each scan becomes quite time consuming.
Comment 2 Nick Clemens 2021-02-28 16:30:25 UTC Comment hidden (obsolete)
Comment 3 Nick Clemens 2021-02-28 16:30:29 UTC Comment hidden (obsolete)
Comment 4 Nick Clemens 2021-02-28 16:30:32 UTC Comment hidden (obsolete)
Comment 5 Nick Clemens 2021-02-28 16:30:35 UTC Comment hidden (obsolete)
Comment 6 Nick Clemens 2021-03-01 16:40:45 UTC Comment hidden (obsolete)
Comment 7 ByWater Sandboxes 2021-03-02 16:52:12 UTC Comment hidden (obsolete)
Comment 8 ByWater Sandboxes 2021-03-02 16:52:14 UTC Comment hidden (obsolete)
Comment 9 ByWater Sandboxes 2021-03-02 16:52:17 UTC Comment hidden (obsolete)
Comment 10 ByWater Sandboxes 2021-03-02 16:52:20 UTC Comment hidden (obsolete)
Comment 11 ByWater Sandboxes 2021-03-02 16:52:22 UTC Comment hidden (obsolete)
Comment 12 Sally 2021-03-02 17:20:01 UTC
The functions all work as described - the two system preferences are:

StaffRetainSearchTerms:  Retain / Don't retain
StaffStickySearchItems:  Copy / Don't copy

Settings:  Retain + Copy
Result:  Current behaviour as on master

Settings:  Don't retain + Copy
Result:  Previous behaviour before Bug 19046

Settings:  Retain + Don't Copy
Settings:  Don't retain + Don't copy
Result:  As stated

Speaking as a user, I think this feature is an either/or scenario, which is a shame.  The way I would like to use it might be impossible to code, but worth asking, I suppose!  

Users want search terms to persist for the following scenario:

- search for 'Roald Dahl'
- return 6000 results, realise you want to search for 'Roald Dahl BFG'
- search isn't retained, so you have to write the whole term again
- but if the search is retained, you just have to add 'BFG' to the end

Users don't want the search terms copied across to other fields (i.e. check out), as described by Lucas.

But if you set:  Retain + Don't copy, although this is really close to what's needed, it re-introduces the problem that copying was designed to fix:

- type a catalog search into the bar whilst you're on the wrong tab (e.g. check out)
- realise and move tab to search the catalog
- now the search is empty again so the term needs to be rewritten, although it persisted in the other tabs

It feels to me that the problem is that copying should only go in one direction - from left to right on the screen, so content written in check out could be moved into search the catalog, but content written in search the catalog tabs can't be moved into check out

This would give the following result:

- librarian types search into check out box; librarian can change tab to search catalog and the term is retained
- librarian searches the catalog and wants to modify the search; term is retained
- librarian searches the catalog, tabs back to check out; term should disappear

I realise it might be impossible, but as an end user, that feels like the ultimate goal.

I've signed it off because the patches do work as described, and do bring back the old functionality.
Comment 13 Katrin Fischer 2021-05-02 15:45:23 UTC Comment hidden (obsolete)
Comment 14 Katrin Fischer 2021-05-02 15:45:28 UTC Comment hidden (obsolete)
Comment 15 Katrin Fischer 2021-05-02 15:45:33 UTC Comment hidden (obsolete)
Comment 16 Katrin Fischer 2021-05-02 15:45:39 UTC Comment hidden (obsolete)
Comment 17 Katrin Fischer 2021-05-02 15:45:44 UTC Comment hidden (obsolete)
Comment 18 Katrin Fischer 2021-05-02 15:45:49 UTC Comment hidden (obsolete)
Comment 19 Katrin Fischer 2021-05-02 15:45:55 UTC Comment hidden (obsolete)
Comment 20 Katrin Fischer 2021-05-02 15:46:01 UTC Comment hidden (obsolete)
Comment 21 Katrin Fischer 2021-05-02 15:58:05 UTC
Hi Nick,

I've done some small follow-ups and some testing:

Tested with: copy & retain

1) Budgets
/cgi-bin/koha/admin/aqbudgetperiods.pl
When I add a search term to catalog search or checkout tab, it's not copied to the other tab.

2) Cataloging
/cgi-bin/koha/cataloguing/addbooks.pl
This seems to work ok. But only the catalog search retains the search term, cataloging seach does not. I think this is intentional, but would probably be a good addition?

3) Circulation
4) Currencies
5) Contracts
6) Home page
7 Notices and slips
8) Patrons
9) Administration

10) Serials
When I enter an ISSN or Title in the first tab, it isn't copied to the other      
tabs.

11) Acquisitions -> suggestions
12) Z3950 Admin

13) Then I have set "don't copy" and "don't retain". But the only tab this seem to affect is the catalog search tab? If I enter a search term in "check out", it will still be copied to checkin, renew, search patrons. Only when switching to catalog search it will be emptied.
This appears a bit of strange behaviour, if it's intentional, we should change the pref description.
Comment 22 Katrin Fischer 2021-05-24 11:26:25 UTC
*** Bug 28401 has been marked as a duplicate of this bug. ***
Comment 23 Koha Team University Lyon 3 2021-11-10 09:20:50 UTC
Hello,
Is someone still working on this one?
Indeed, the librarians from Lyon 3 university libraries complain about the retain of the barcode after the search..

Thanks
Sonia
Comment 24 Fridolin Somers 2021-12-07 19:46:00 UTC
As a quickfix, I propose this JavaScript that sets empty when entering the input :

$(document).ready(function() {
  $("#header_search #catalog_search input[name='q']").focusin(function() {
    $(this).val("");
  });
});
Comment 25 Mark Alexander 2022-04-29 11:48:05 UTC
(In reply to Fridolin Somers from comment #24)
> As a quickfix, I propose this JavaScript that sets empty when entering the
> input :
> 
> $(document).ready(function() {
>   $("#header_search #catalog_search input[name='q']").focusin(function() {
>     $(this).val("");
>   });
> });

I've tried adding this to IntranetUserJS but the search term is not erased.  This is in Koha 20.05.18.  I've tried both Brave Browser and Firefox.  The Firefox inspector shows that the code for the event is attached to the entry field, but for some reason the code doesn't seem to be running.

My librarian is pretty upset about this problem.  It interferes with our workflow for checking the status of a stack of books.
Comment 26 Mark Alexander 2022-04-29 12:04:31 UTC
Adding to above comment: I found that if I use the tab key to move focus away from the search box, then move the focus back to the search box by clicking in it, the entry is cleared.  So the "focusin" event code is running, but not at the right time.  I'm not familiar with jquery so any help with fixing this would be greatly appreciated.
Comment 27 Fridolin Somers 2022-04-30 03:17:58 UTC
Hi,

You can try empying directly after page loaded :

$(document).ready(function() {
  $("#header_search #catalog_search input[name='q']").val("");
});
Comment 28 Fridolin Somers 2022-05-05 06:24:55 UTC
This needs a rebase since Bug 28356
Comment 29 Fridolin Somers 2022-05-05 06:39:36 UTC
As a really quick fix, you can remove term retaining in catalogue search box with :

diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/catalogue-search-box.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/catalogue-search-box.inc
index 134bf93..6323123 100644
--- a/koha-tmpl/intranet-tmpl/prog/en/includes/catalogue-search-box.inc
+++ b/koha-tmpl/intranet-tmpl/prog/en/includes/catalogue-search-box.inc
@@ -5,7 +5,7 @@
                 [% IF ( Koha.Preference('IntranetCatalogSearchPulldown') ) %]
                     [% INCLUDE 'search_indexes.inc' %]
                 [% END %]
-            <input type="text" name="q" id="search-form" size="40" value="[% ms_value | html %]" title="Enter the terms you wish to search for." class="query form-text head-searchbox" />
+            <input type="text" name="q" id="search-form" size="40" title="Enter the terms you wish to search for." class="query form-text head-searchbox" />
             <input type="submit" value="Submit"  class="submit" />
         </form>
     </div>
Comment 30 Mark Alexander 2022-05-05 16:07:05 UTC
I tried this fix in cat-search.inc (in 20.05), and in catalogue-search-box.inc (in  21.11) and it does not work.

Other things I tried that did not work:

1. Disabling keep_text in staff-global.js.

2. Disabling the code in search.pl that inserts ms_value into the template.

3. The Javascript snippet mentioned above.  It runs correctly, but then at some later point, the search box gets filled in again with the last search term.
Comment 31 Fridolin Somers 2022-05-05 22:04:57 UTC
Do you test only with barcode scanner ?
Or maybe it is a behavior of autocomplete from web browser itself.
Comment 32 Mark Alexander 2022-05-06 23:54:14 UTC
I did not test with a barcode scanner.  I entered the barcodes manually.

I tried it with three browsers: Firefox, Brave, and Chrome.  It doesn't behave like an autocompletion issue.  When I hit the Submit button, the Javascript snippet clears the entry field, then immediately after that something fills the entry field with the last search term.  I did not move the cursor into the search field and start typing characters to get that barcode to appear; I simply hit the Submit button.
Comment 33 Jonathan Druart 2022-05-18 09:32:09 UTC
*** Bug 27697 has been marked as a duplicate of this bug. ***
Comment 34 Mark Alexander 2022-05-18 11:53:36 UTC
Thank you for the reference to bug 23475.  Disabling the new code in detail.tt fixed the problem for me.
Comment 35 Florian 2022-06-28 14:01:33 UTC Comment hidden (obsolete)
Comment 36 David Nind 2022-06-29 00:07:02 UTC
Patch no longer applies:

Apply? [(y)es, (n)o, (i)nteractive] y
Applying: Bug 26247: Make retaining search terms in staff client optional
Using index info to reconstruct a base tree...
M	catalogue/search.pl
M	installer/data/mysql/mandatory/sysprefs.sql
M	installer/data/mysql/updatedatabase.pl
M	koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/searching.pref
Falling back to patching base and 3-way merge...
Auto-merging koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/searching.pref
Auto-merging installer/data/mysql/updatedatabase.pl
Auto-merging installer/data/mysql/mandatory/sysprefs.sql
Auto-merging catalogue/search.pl
Applying: Bug 26247: Consolidate search box code
.git/rebase-apply/patch:170: trailing whitespace.
        </form>	
.git/rebase-apply/patch:217: trailing whitespace.
        </form>	
.git/rebase-apply/patch:242: trailing whitespace.
	</form>	
warning: 3 lines add whitespace errors.
Using index info to reconstruct a base tree...
M	koha-tmpl/intranet-tmpl/prog/en/includes/budgets-admin-search.inc
M	koha-tmpl/intranet-tmpl/prog/en/includes/cat-search.inc
M	koha-tmpl/intranet-tmpl/prog/en/includes/cataloging-search.inc
M	koha-tmpl/intranet-tmpl/prog/en/includes/circ-search.inc
M	koha-tmpl/intranet-tmpl/prog/en/includes/contracts-admin-search.inc
M	koha-tmpl/intranet-tmpl/prog/en/includes/currencies-admin-search.inc
M	koha-tmpl/intranet-tmpl/prog/en/includes/home-search.inc
M	koha-tmpl/intranet-tmpl/prog/en/includes/letters-search.inc
M	koha-tmpl/intranet-tmpl/prog/en/includes/patrons-admin-search.inc
M	koha-tmpl/intranet-tmpl/prog/en/includes/prefs-admin-search.inc
M	koha-tmpl/intranet-tmpl/prog/en/includes/serials-search.inc
M	koha-tmpl/intranet-tmpl/prog/en/includes/suggestions-add-search.inc
M	koha-tmpl/intranet-tmpl/prog/en/includes/z3950-admin-search.inc
.git/rebase-apply/patch:170: trailing whitespace.
        </form>	
.git/rebase-apply/patch:217: trailing whitespace.
        </form>	
.git/rebase-apply/patch:242: trailing whitespace.
	</form>	
warning: 3 lines add whitespace errors.
Falling back to patching base and 3-way merge...
Auto-merging koha-tmpl/intranet-tmpl/prog/en/includes/z3950-admin-search.inc
CONFLICT (content): Merge conflict in koha-tmpl/intranet-tmpl/prog/en/includes/z3950-admin-search.inc
Auto-merging koha-tmpl/intranet-tmpl/prog/en/includes/suggestions-add-search.inc
CONFLICT (content): Merge conflict in koha-tmpl/intranet-tmpl/prog/en/includes/suggestions-add-search.inc
Auto-merging koha-tmpl/intranet-tmpl/prog/en/includes/serials-search.inc
CONFLICT (content): Merge conflict in koha-tmpl/intranet-tmpl/prog/en/includes/serials-search.inc
Auto-merging koha-tmpl/intranet-tmpl/prog/en/includes/prefs-admin-search.inc
CONFLICT (content): Merge conflict in koha-tmpl/intranet-tmpl/prog/en/includes/prefs-admin-search.inc
Auto-merging koha-tmpl/intranet-tmpl/prog/en/includes/patrons-admin-search.inc
Auto-merging koha-tmpl/intranet-tmpl/prog/en/includes/letters-search.inc
CONFLICT (content): Merge conflict in koha-tmpl/intranet-tmpl/prog/en/includes/letters-search.inc
Auto-merging koha-tmpl/intranet-tmpl/prog/en/includes/home-search.inc
CONFLICT (content): Merge conflict in koha-tmpl/intranet-tmpl/prog/en/includes/home-search.inc
Auto-merging koha-tmpl/intranet-tmpl/prog/en/includes/currencies-admin-search.inc
CONFLICT (content): Merge conflict in koha-tmpl/intranet-tmpl/prog/en/includes/currencies-admin-search.inc
Auto-merging koha-tmpl/intranet-tmpl/prog/en/includes/contracts-admin-search.inc
CONFLICT (content): Merge conflict in koha-tmpl/intranet-tmpl/prog/en/includes/contracts-admin-search.inc
Auto-merging koha-tmpl/intranet-tmpl/prog/en/includes/circ-search.inc
CONFLICT (content): Merge conflict in koha-tmpl/intranet-tmpl/prog/en/includes/circ-search.inc
Auto-merging koha-tmpl/intranet-tmpl/prog/en/includes/cataloging-search.inc
CONFLICT (content): Merge conflict in koha-tmpl/intranet-tmpl/prog/en/includes/cataloging-search.inc
Auto-merging koha-tmpl/intranet-tmpl/prog/en/includes/cat-search.inc
CONFLICT (content): Merge conflict in koha-tmpl/intranet-tmpl/prog/en/includes/cat-search.inc
Auto-merging koha-tmpl/intranet-tmpl/prog/en/includes/budgets-admin-search.inc
CONFLICT (content): Merge conflict in koha-tmpl/intranet-tmpl/prog/en/includes/budgets-admin-search.inc
error: Failed to merge in the changes.
Patch failed at 0001 Bug 26247: Consolidate search box code
Comment 37 David Nind 2022-06-29 00:26:59 UTC
These are my draft testing notes (may need updating when the patch applies again and I can complete the tests):

1. In the staff interface, type "perl" in the "Search the catalog" input field and click "Submit"
2. Switch between the different areas in the search header from the catalog search results page and confirm that the search term is retained for:
  - Check out
  - Check in
  - Renew
3. Go back to the staff interface home page for each of the following, and enter and submit appropriate information in the other input fields in the search header:
  - Search patrons, for example: 'a': search term retained when there is more than one search result
  - Search patrons, for example: 'Mary': search term cleared when there is only one result, and you select it from the autocomple and go to the patron's details page
  - Check out - same as for search patrons: search term retained if there is a search results page, not retained if select specific person, cleared once specific person selected from search results
  - Check in - enter a barcode: not retained (cleared)
  - Renew - enter a barcode:  not retained (cleared)
4. Apply the patches (git bz apply 26247), update the database (updatedatabase), flush_memcached, restart_all, and clear your browser cache (or open the staff interface in a new private or incognito window)
5. In the system preferences, go to Searching > Search form and review the two new system preferences:
  . RetainCatalogSearchTerms
  . RetainPatronsSearchTerms
6. Review the text for the system preferences and make sure they make sense.
7. Test the retain and don't retain settings for each system preference and the various combinations, they should work as expected (see also step 3):
   - RetainCatalogSearchTerms (don't retain) and RetainPatronsSearchTerms (don't retain) 
   - RetainCatalogSearchTerms (retain) and RetainPatronsSearchTerms (retain)
   - RetainCatalogSearchTerms (don't retain) and RetainPatronsSearchTerms (retain)
   - RetainCatalogSearchTerms (retain) and RetainPatronsSearchTerms (don't retain)
8. Confirm the "Search the catalog" appears and works as expected from modules:
   - Budgets
   - Cataloging
   - Circulation
   - Currencies
   - Contracts
   - Home page
   - Notices and slips
   - Patrons
   - Administration
   - Serials
   - Acquisitions -> suggestions
   - Z3950 Admin
9. Signoff!
Comment 38 David Nind 2022-06-29 00:41:11 UTC
I think the text for the two new system preferences needs updating after the last patch (Adding two Sysprefs for Search Terms), similar to Katrin's QA follow-up - Fix 0/1 and terminology in preferences patch (staff client to staff interface):

- RetainCatalogSearchTerms: When searching from search the catalog in the staff interface header, [don't retain|retain] search terms between searches.

- RetainPatronsSearchTerms: When searching from check out or search patrons in the staff interface header, [don't retain|retain] search terms between searches.

Simpler could be: [don't retain|retain] search terms between searches when searching from .... in the staff interface header.

Not sure about the 0/1 settings...

Also, whether they should be under Searching > Search form (like Katrin's patch) or split over circulation and searching system preference areas.
Comment 39 Florian 2022-06-30 08:39:02 UTC Comment hidden (obsolete)
Comment 40 Florian 2022-06-30 08:41:24 UTC
This should work now as a standalone patch, do not apply the previous ones when testing my proposed solution, as this does not build on what was proposed first.

Also rephrased the system preferences texts according to David's suggestion.
Comment 41 David Nind 2022-07-07 13:54:26 UTC Comment hidden (obsolete)
Comment 42 David Nind 2022-07-07 14:12:37 UTC
(In reply to Florian from comment #40)
> Also rephrased the system preferences texts according to David's suggestion.

Thanks!

I have retested as per the test plan and updated the text for the release notes (as the 'Consolidate search box code' is not included.

I would like to see 'Consolidate the search code' patch picked up as it seemed like an nice tidy up - maybe a separate bug? I'll leave that for the QA team to decide or comment on.
Comment 43 Nick Clemens 2022-07-14 12:17:56 UTC
(In reply to David Nind from comment #42)
> I would like to see 'Consolidate the search code' patch picked up as it
> seemed like an nice tidy up - maybe a separate bug? 

Bug 28356
Comment 44 David Nind 2022-07-14 14:05:15 UTC
(In reply to Nick Clemens from comment #43)
> (In reply to David Nind from comment #42)
> > I would like to see 'Consolidate the search code' patch picked up as it
> > seemed like an nice tidy up - maybe a separate bug? 
> 
> Bug 28356

Thanks Nick!
Comment 45 Nick Clemens 2022-08-01 15:49:56 UTC Comment hidden (obsolete)
Comment 46 Martin Renvoize 2022-09-12 16:10:27 UTC
Created attachment 140473 [details] [review]
Bug 26247: Adding 2 Sysprefs for Search Terms

This patch adds two system preferences options : 'RetainCatalogSearchTerms' and 'RetainPatronsSearchTerms'. If enabled, search terms will be retained between searches made from, respectively, the Search Catalog header and the Checkout or Search Patrons headers. If disabled, the searchbars will clear out between page loads.

Attention, this is an alternate solution from the previous patches, ONLY apply this patch when testing and not the previous ones.Changed the syspref wording as well.

To test:
1 - From the staff client, search some terms using the Check out header search bar.
2 - Confirm search terms are retained.
3 - Do Step 1-2 twice again, this time using the Search patrons and Search the catalog.
4 - Apply patch (again, only this one), update database.
5 - In the system preferences, look for RetainCatalogSearchTerms and set it to 'don't retain'.
6 - Use the checkout head search bar again, confirm that search terms aren't retained after page load.
7 - Do Step 5-6 once again, this time with the RetainPatronsSearchTerms and the Search Patrons and Search the catalog headers.
8 - Search boxes should be cleared.

Thanks-to: Fridolin Somers and Nick Clemens for the bases I built on.
Signed-off-by: Florian Bontemps <florian.bontemps@biblibre.com>
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 47 Martin Renvoize 2022-09-12 16:10:33 UTC
Created attachment 140474 [details] [review]
Bug 26247: (QA follow-up) Merge DB Updates
Comment 48 Martin Renvoize 2022-09-12 16:11:24 UTC
Great work, Passing QA
Comment 49 Tomás Cohen Arazi 2022-09-12 20:12:21 UTC
Pushed to master for 22.11.

Nice work everyone, thanks!
Comment 50 Marcel de Rooy 2022-09-15 06:05:30 UTC
Please clean atomicupdate folder