[Koha-bugs] [Bug 33190] New: Add search history button to advance search form if EnableSearchHistory keep

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Fri Mar 10 06:46:11 CET 2023


https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33190

            Bug ID: 33190
           Summary: Add search history button to advance search form if
                    EnableSearchHistory keep
 Change sponsored?: ---
           Product: Koha
           Version: master
          Hardware: All
                OS: All
            Status: NEW
          Severity: enhancement
          Priority: P5 - low
         Component: Searching
          Assignee: koha-bugs at lists.koha-community.org
          Reporter: adam.styles at esa.edu.au
        QA Contact: testopia at bugs.koha-community.org

Created attachment 148047
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=148047&action=edit
screen shot of search history button in koha dev box as preview

Hi All,

I believe the 'search history' feature to be quite useful in daily repeated
search work flows, further to this it is a feature fairly hidden behind a drop
down UI in the top right when logged in. 

Therefor to promote the use of this valuable tool and also to improve it's
discoverability, I propose the follow new enhancement.

User story:
* Add 'search history' button to advanced search button groups if
'EnableSearchHistory' sys pref is set to 'keep'

Key logic:
* If 'EnableSearchHistory' sys pref is set to 'keep' (this is an existing sys
pref), an additional 'search history' button will populate at the of the
current advance search buttons group
* This new button element makes use of the existing syntax for other button on
page and loads the font awesome 4.7 history icon which aligns with the buttons
action.
* The button will not display unless 'EnableSearchHistory' sys pref is set to
'keep', which makes use of a IF statement in the advsearch.tt template file at
around line 100 ish (see patch)

```
[% IF Koha.Preference('EnableSearchHistory') %]
<div class="btn-group">
<a href="/cgi-bin/koha/catalogue/search-history.pl" class="btn btn-link"><i
class="fa fa-history"></i> search history</a>
</div>
[% END %]

```

I have tested in Koha dev box v22 and all works well. I will create test plan
in patch commit message.

I am creating my first patch for this very soon, just reading coding guidelines
to ensure I patch as community expects.

See attached screen shot.

I welcome feedback.

Thanks.

-- 
You are receiving this mail because:
You are watching all bug changes.
You are the assignee for the bug.


More information about the Koha-bugs mailing list