[Bug 20346] New: Patron filtering resulting in new search rather than filtering existing results

classic Classic list List threaded Threaded
17 messages Options
Reply | Threaded
Open this post in threaded view
|

[Bug 20346] New: Patron filtering resulting in new search rather than filtering existing results

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

            Bug ID: 20346
           Summary: Patron filtering resulting in new search rather than
                    filtering existing results
 Change sponsored?: ---
           Product: Koha
           Version: master
          Hardware: All
                OS: All
            Status: ASSIGNED
          Severity: enhancement
          Priority: P5 - low
         Component: Patrons
          Assignee: [hidden email]
          Reporter: [hidden email]
        QA Contact: [hidden email]
                CC: [hidden email], [hidden email]

After getting a range of  results from a patron search on the
members/members-home.pl if you use the patron filtering a new search is
performed rather than the existing results of the first search being filtered
down.

This makes finding a user in a institution with a large number of similarly
named patrons very difficult.

--
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[hidden email]
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/
Reply | Threaded
Open this post in threaded view
|

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

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

--- Comment #1 from Alex Buckley <[hidden email]> ---
Created attachment 72496
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=72496&action=edit
Bug 20346 - Server side patron filtering implemented

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.

Test plan:
1. Go to /members/members-home.pl and create 4 users. Make them all have
the same first and last name but vary the homebranch, email addresses
and dates of birth

2. Perform a search by writing in the first and last name combination
shared by the 4 users and you should get 4 results

3. Filter by writing in the email adrr

Sponsored-By: Catalyst IT

--
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[hidden email]
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/
Reply | Threaded
Open this post in threaded view
|

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

bugzilla-daemon
In reply to this post by bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20346

--- Comment #2 from Alex Buckley <[hidden email]> ---
Created attachment 72520
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=72520&action=edit
New patron filter with the search field type dropdown box removed

--
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[hidden email]
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/
Reply | Threaded
Open this post in threaded view
|

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

bugzilla-daemon
In reply to this post by bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20346

Alex Buckley <[hidden email]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Attachment #72496|0                           |1
        is obsolete|                            |

--
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[hidden email]
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/
Reply | Threaded
Open this post in threaded view
|

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

bugzilla-daemon
In reply to this post by bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20346

--- Comment #3 from Alex Buckley <[hidden email]> ---
Created attachment 72523
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=72523&action=edit
Bug 20346 - Server side patron filtering implemented

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. [hidden email],
[hidden email], [hidden email] (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
[hidden email] should be displayed

Sponsored-By: Catalyst IT

--
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[hidden email]
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/
Reply | Threaded
Open this post in threaded view
|

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

bugzilla-daemon
In reply to this post by bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20346

Alex Buckley <[hidden email]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Attachment #72523|0                           |1
        is obsolete|                            |

--
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[hidden email]
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/
Reply | Threaded
Open this post in threaded view
|

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

bugzilla-daemon
In reply to this post by bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20346

--- Comment #4 from Alex Buckley <[hidden email]> ---
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. [hidden email],
[hidden email], [hidden email] (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
[hidden email] should be displayed

Sponsored-By: Catalyst IT

--
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[hidden email]
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/
Reply | Threaded
Open this post in threaded view
|

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

bugzilla-daemon
In reply to this post by bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20346

Alex Buckley <[hidden email]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Attachment #72523|1                           |0
        is obsolete|                            |

--
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[hidden email]
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/
Reply | Threaded
Open this post in threaded view
|

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

bugzilla-daemon
In reply to this post by bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20346

Alex Buckley <[hidden email]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Attachment #72623|0                           |1
        is obsolete|                            |

--
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[hidden email]
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/
Reply | Threaded
Open this post in threaded view
|

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

bugzilla-daemon
In reply to this post by bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20346

--- Comment #5 from Alex Buckley <[hidden email]> ---
Created attachment 72624
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=72624&action=edit
Bug 20346 - Amended Server side patron filtering

The number of results returned has been fixed so it is not affected by
what the user sets for the number of records they want displayed on each
page.

In addition to ensuring all matching patrons are returned no matter
what the numberof patrons to be displayed on each page is, filtering
also takes place over all returned patrons and not just those displayed
on the current page this ensures filtering finds all matching patrons.

Test plan:
The same as the previous bug 20346 patch

Sponsored-By: Catalyst IT

--
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[hidden email]
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/
Reply | Threaded
Open this post in threaded view
|

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

bugzilla-daemon
In reply to this post by bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20346

--- Comment #6 from Alex Buckley <[hidden email]> ---
Created attachment 72815
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=72815&action=edit
Bug 20346 - New wording above the patron table on the patron page

Now the wording of the text above the patron result table is in the
format 'Users found for: <searchtype> <term>
filtered by <filtersearchtype> <filterterm>'

Test plan:
Same as the two previous patches for this bug, however notice after
applying this patch and perform a search and filter event that the
wording of this text above the patron result table is changed to the
format 'Users found for: <searchtype> <term>
filtered by <filtersearchtype> <filterterm>'

Sponsored-By: Catalyst IT

--
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[hidden email]
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/
Reply | Threaded
Open this post in threaded view
|

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

bugzilla-daemon
In reply to this post by bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20346

Alex Buckley <[hidden email]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |Needs Signoff

--
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[hidden email]
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/
Reply | Threaded
Open this post in threaded view
|

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

bugzilla-daemon
In reply to this post by bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20346

paxed <[hidden email]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |[hidden email]

--- Comment #7 from paxed <[hidden email]> ---
Comment on attachment 72523
  --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=72523
Bug 20346 - Server side patron filtering implemented

Untranslatable strings:

+                    $('#searchmember_filter').attr("title","Please enter date
inputs in the format mm/dd/yyyy").tooltip('show');
+                    $('#searchmember_filter').attr("title","Please enter date
inputs in the format dd/mm/yyyy").tooltip('show');
+                    $('#searchmember_filter').attr("title","Please enter date
inputs in the format yyyy-mm-dd").tooltip('show');
+                    $('#searchmember_filter').attr("title","Please enter date
inputs in the format dd.mm.yyyy").tooltip('show');

--
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[hidden email]
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/
Reply | Threaded
Open this post in threaded view
|

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

bugzilla-daemon
In reply to this post by bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20346

--- Comment #8 from paxed <[hidden email]> ---
Comment on attachment 72815
  --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=72815
Bug 20346 - New wording above the patron table on the patron page

Untranslatable strings:

+                     filtered = " starting with ";
+               } else {
+                     filtered = " containing ";
+               }
+               filtered += "'" + $("#searchmember_filter").val() + "'";

These would also better written using _(" starting with '%s'").format(...)
instead of concatenation.

Same problems here:

+                    filtered += " begins with " + "'" +
$("#firstletter_filter").val() +"'";
+                 } else {
+                    filtered = " begins with " + "'" +
$("#firstletter_filter").val() +"'";

And here:

+                    filtered += " with category " + "'" +
$("#categorycode_filter").find("option:selected").text() + "'";
+                  } else {
+                    filtered = " with category " + "'" +
$("#categorycode_filter").find("option:selected").text() + "'";

And:

+                    filtered += " in library " +
$("#branchcode_filter").find("option:selected").text();
+                 } else {
+                    filtered = " in library " +
$("#branchcode_filter").find("option:selected").text();

--
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[hidden email]
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/
Reply | Threaded
Open this post in threaded view
|

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

bugzilla-daemon
In reply to this post by bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20346

Séverine Queune <[hidden email]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|Needs Signoff               |In Discussion
                 CC|                            |[hidden email]

--- Comment #9 from Séverine Queune <[hidden email]> ---
The patch works as described.
It's a good enhencement but in my point of view, the use of the filter block
becomes too restrictive.
For exemple, it's not possible once the patch is applied to search all the
users using the same email adress if they have different surnames. This is a
feature we use a lot and it would bothered me if we lose it.
Is it possible to keep a "search" fonction if no research is made on the
toolbar, instead of being only filter options ?

--
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[hidden email]
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/
Reply | Threaded
Open this post in threaded view
|

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

bugzilla-daemon
In reply to this post by bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20346

--- Comment #10 from Alex Buckley <[hidden email]> ---
Created attachment 73520
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=73520&action=edit
Bug 20346 - Making JS strings translatable

This is based on tester feedback in comments 7 and 8

Sponsored-By: Catalyst IT

--
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[hidden email]
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/
Reply | Threaded
Open this post in threaded view
|

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

bugzilla-daemon
In reply to this post by bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20346

--- Comment #11 from Séverine Queune <[hidden email]> ---
I'm highly surprised because this patch is still "In discussion" but one of the
proposed modification (remove 'search field' dropbox) is now applied on 18.05.
I'm quite sad about that because, as I said on my comment in march, it was
really useful for our local use, and I wasn't prepare to loose this option as
there were no activity on that ticket since april.
Can this modification come from anoter patch ?
I didn't see which one it could be when I took a look to 18.05 release notes.

--
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[hidden email]
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/