Bug 5904

Summary: ysearch.pl members improvements (Independant branches behaviour)
Product: Koha Reporter: Chris Cormack <chris>
Component: PatronsAssignee: Jonathan Druart <jonathan.druart>
Status: CLOSED FIXED QA Contact: Bugs List <koha-bugs>
Severity: normal    
Priority: P5 - low CC: bgkriegel, claire.hernandez, gmcharlt, jonathan.druart, katrin.fischer, kyle, srdjan, tomascohen
Version: 3.4   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: Trivial patch
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Bug Depends on:    
Bug Blocks: 5575    
Attachments: Proposed patch
Follow up patch
Follow up patch
Bug 5904: ysearch.pl members improvements (Independent branches behaviour)
[SIGNED-OFF] Bug 5904: ysearch.pl members improvements (Independent branches behaviour)
Bug 5904: ysearch.pl members improvements (Independent branches behaviour)
Bug 5904: ysearch.pl members improvements (Independent branches behaviour)
Bug 5904: ysearch.pl members improvements (Independent branches behaviour)

Description Chris Cormack 2011-03-20 21:13:24 UTC

    
Comment 1 Chris Cormack 2011-03-20 21:26:11 UTC Comment hidden (obsolete)
Comment 2 Chris Cormack 2011-03-20 21:27:25 UTC Comment hidden (obsolete)
Comment 3 MJ Ray (software.coop) 2011-04-01 09:42:38 UTC
This bug is mentioned in:
Bug 5904 : ysearch.pl members	improvements (Independant branches behaviour) http://lists.koha-community.org/pipermail/koha-patches/2011-March/014143.html
Bug 5904 - Follow up patch,	with the db changes http://lists.koha-community.org/pipermail/koha-patches/2011-March/014144.html
Comment 4 claire.hernandez@biblibre.com 2011-04-07 14:33:28 UTC
Produce this query:
SELECT surname, firstname, cardnumber, address, city, zipcode, country 
             FROM borrowers 
             WHERE surname LIKE 'a%'
             OR firstname LIKE 'a%'
             OR cardnumber LIKE 'a%' AND borrowers.branchcode ='MPL' ORDER BY surname, firstname

I think it should produce 
...
WHERE (surname LIKE 'a%'
             OR firstname LIKE 'a%'
             OR cardnumber LIKE 'a%') AND borrowers.branchcode ='MPL' ORDER BY surname, firstname
Comment 5 claire.hernandez@biblibre.com 2011-04-07 14:34:27 UTC
Is .pref file missing?
Comment 6 claire.hernandez@biblibre.com 2011-04-07 15:02:06 UTC Comment hidden (obsolete)
Comment 7 Owen Leonard 2011-10-11 16:13:43 UTC
This no longer applies. I would be helpful if we could also get a good explanation of what this patch is supposed to fix and how to test.
Comment 8 Katrin Fischer 2013-04-14 07:43:17 UTC
Patches need to be rewritten by now, because we handle system preferences differently now and less files have to be changed.
Comment 9 Jonathan Druart 2013-06-27 13:43:06 UTC Comment hidden (obsolete)
Comment 10 Srdjan Jankovic 2013-08-06 04:24:14 UTC Comment hidden (obsolete)
Comment 11 Srdjan Jankovic 2013-08-06 04:27:46 UTC
I've signed this off, but not sure how much sense it makes. It is just for auto-complete, so used only for the checkouts. If you search eg patrons on /members/member.pl it is not used.
Comment 12 Kyle M Hall 2013-08-30 13:13:00 UTC
(In reply to Srdjan Jankovic from comment #11)
> I've signed this off, but not sure how much sense it makes. It is just for
> auto-complete, so used only for the checkouts. If you search eg patrons on
> /members/member.pl it is not used.

I agree. Independent branches already hides patrons from other branches, so having a separate system preference for this doesn't make much sense to me.

Jonathan, can you think of any compelling reason we should have a separate system preference for this? I would consider the original functionality to be a bug, and this to be a bug fix.

If you agree, a followup to remove the new system preference should be sufficient for this to pass qa.
Comment 13 Jonathan Druart 2013-08-30 14:17:49 UTC
(In reply to Kyle M Hall from comment #12)
> (In reply to Srdjan Jankovic from comment #11)
> > I've signed this off, but not sure how much sense it makes. It is just for
> > auto-complete, so used only for the checkouts. If you search eg patrons on
> > /members/member.pl it is not used.
> 
> I agree. Independent branches already hides patrons from other branches, so
> having a separate system preference for this doesn't make much sense to me.
> 
> Jonathan, can you think of any compelling reason we should have a separate
> system preference for this? I would consider the original functionality to
> be a bug, and this to be a bug fix.

Kyle,
Yes you are right, I stupidly rebased this patch but it does not make sense for me neither.
Comment 14 Jonathan Druart 2013-08-30 14:18:07 UTC Comment hidden (obsolete)
Comment 15 Srdjan Jankovic 2013-09-02 00:18:03 UTC Comment hidden (obsolete)
Comment 16 Kyle M Hall 2013-09-03 14:04:03 UTC
Created attachment 20766 [details] [review]
Bug 5904: ysearch.pl members improvements (Independent branches behaviour)

Test plan:
- Add a staff user foo in a library A
- Add a staff user bar in a library B
- log in as foo and try to search 'bar'
- Switch on (Prevent) the new pref IndependentBranches
- the search returns no result
- log in as a superlibrarian
- Check that you are allow to search all patrons.

Signed-off-by: Srdjan <srdjan@catalyst.net.nz>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Passes koha-qa.pl, works as advertised.
Comment 17 Galen Charlton 2013-09-04 16:44:28 UTC
Pushed to master.  Thanks, Jonathan!
Comment 18 Tomás Cohen Arazi 2013-09-13 18:49:24 UTC
This patch has been pushed to 3.12.x, will be in 3.12.5.

Thanks Jonathan!
Comment 19 Bernardo Gonzalez Kriegel 2013-10-13 13:26:21 UTC
Pushed to 3.10.x, will be in 3.10.12