Bug 5750 - Add exact matching filter for categorycode and branchcode fields in search members's result
Summary: Add exact matching filter for categorycode and branchcode fields in search me...
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Patrons (show other bugs)
Version: Main
Hardware: All All
: PATCH-Sent (DO NOT USE) enhancement
Assignee: Kyle M Hall
QA Contact: Bugs List
URL:
Keywords:
Depends on:
Blocks: 5575
  Show dependency treegraph
 
Reported: 2011-02-13 22:30 UTC by Chris Cormack
Modified: 2012-10-25 23:03 UTC (History)
5 users (show)

See Also:
Change sponsored?: ---
Patch complexity: ---
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:
Circulation function:


Attachments
Proposed Patch (1.95 KB, patch)
2011-02-13 22:36 UTC, Chris Cormack
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Chris Cormack 2011-02-13 22:30:47 UTC

    
Comment 1 Chris Cormack 2011-02-13 22:36:57 UTC
Created attachment 3140 [details] [review]
Proposed Patch
Comment 2 Nicole C. Engard 2011-03-01 18:52:34 UTC
Isn't this in Koha already? If not can you explain more what it's supposed to do so I can test?
Comment 3 MJ Ray (software.coop) 2011-03-02 18:47:53 UTC
This bug is mentioned in:
Bug 5750: (MT #4095) add exact matching	filter for categorycode and branchcode fields in search	members's result http://lists.koha-community.org/pipermail/koha-patches/2011-February/013844.html
Comment 4 Katrin Fischer 2011-03-14 06:12:31 UTC
I ran into this problem in one of our installations (3.2.2) and master:

If you search for Staff (categorycode S) it will also bring up Schools and Students (SC, ST).

If you search for library A, it will also bring up borrowers from library AB (branchcode).
Comment 5 Chris Cormack 2011-03-15 09:13:10 UTC
Patch pushed, please test and mark resolved
Comment 6 Ian Walls 2011-04-01 20:30:15 UTC
This patch breaks patron search.

If both text and a branchcode or categorycode are specified, the text is ignored, and ALL matching patrons of either that branch or category (or both together) are returned, regardless of whether they meet the textual requirement.

A fix for this is particularly difficult to generate, because the root of the Search() routing is in C4::SQLHelper, a very complex and twisty module.
Comment 7 Ian Walls 2011-04-01 21:06:22 UTC
My apologies; apparently I got the commit IDs wrong.  This is fine, the commit that touches members/member.pl before it is the culprit.