[Koha-bugs] [Bug 20346] Patron filtering resulting in new search rather than filtering existing results

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Sun Mar 11 04:41:48 CET 2018


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

--- Comment #4 from Alex Buckley <alexbuckley at catalyst.net.nz> ---
Created attachment 72623
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=72623&action=edit
Bug 20346 - Server side patron filtering implemented - Amended

Server side (in the svc/members/search file) perl logic for filtering
results returned from patron searches checks all patron data fields for
a match with the filter value.

This filtering works in the following steps: when filtering is initiated
the original search using the original search query is run again and
then the filter value is used to filter the resulting data, thereby
using both the search and filter values to easily find a patron.

The submitted filter value is automatically checked against
every patron value in every patron record returned from the search and
so there is no need for a specific data value to be
selected with the select dropdown box id=searchfieldstype_filter and so
that select dropdown has been removed due to this redundancy.

This filter works for both filtering based on finding a match containing
the filter value and, filtering based on finding a match starting with
the filter value.

A tooltip is displayed on the searchmember_filter input box to inform
the user what format they should enter date formats. The tooltip tells
the user to follow the date format of the dateformat syspref, meaning if
the Koha instance has the 'metric' dataformat syspref value set then the
tooltip will tell the user to enter a date value in the format
dd/mm/yyyy

Test plan:
1. Go to /members/members-home.pl and create 4 users. Make 3 of them have
the same first and last name (e.g. first name = 'Fred' and last name ='Jones')
but vary the homebranch, email addresses (e.g. fred at gmail.com,
fred at hotmail.com, fredj at gmail.com (make this user have a date of birth of 1st
jan 1980)) and make the fourth user have the first and last name of "Fred"
"Smith"

2. Perform a search by writing in the 'Jones' value and you should get 3
results

3. Filter by writing in the word "Fred", with the search field
="standard" and searchtype="Contains" and this will give you 4 results
because a new search for all users containing "Fred" is performed rather
than filtering the results of the "Jones" search for the term "Fred"

4. Apply patch

5. Restart plack, apache2 and memcached

6. Refresh the patron page

7. Notice the search field dropdown has been removed because the
filtering now automatically checks all patron data fields. Also notice
when you hover over the filter textbox a tooltip message is displayed
informing you the appropriate format for you to input date values in.
This date format recommended is based on the value of the dateformat
syspref

8. Repeat step 2 and you should get 3 results

9. Repeat step 3 and notice you get 3 results because the filtering is
happening on the results of search rather than performing a new search

10. Perform another filter of the search by inputting the date 1st jan 1980 in
the appropriate format described in
the tooltip and the patron page for the patron with the email address
fredj at gmail.com should be displayed

Sponsored-By: Catalyst IT

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


More information about the Koha-bugs mailing list