Bug 5904 - ysearch.pl members improvements (Independant branches behaviour)
Summary: ysearch.pl members improvements (Independant branches behaviour)
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Patrons (show other bugs)
Version: 3.4
Hardware: All All
: P5 - low normal (vote)
Assignee: Jonathan Druart
QA Contact: Bugs List
URL:
Keywords:
Depends on:
Blocks: 5575
  Show dependency treegraph
 
Reported: 2011-03-20 21:13 UTC by Chris Cormack
Modified: 2014-12-07 20:02 UTC (History)
8 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Trivial patch
Text to go in the release notes:
Version(s) released in:


Attachments
Proposed patch (1.33 KB, patch)
2011-03-20 21:26 UTC, Chris Cormack
Details | Diff | Splinter Review
Follow up patch (10.09 KB, patch)
2011-03-20 21:27 UTC, Chris Cormack
Details | Diff | Splinter Review
Follow up patch (2.07 KB, patch)
2011-04-07 15:02 UTC, claire.hernandez@biblibre.com
Details | Diff | Splinter Review
Bug 5904: ysearch.pl members improvements (Independent branches behaviour) (4.62 KB, patch)
2013-06-27 13:43 UTC, Jonathan Druart
Details | Diff | Splinter Review
[SIGNED-OFF] Bug 5904: ysearch.pl members improvements (Independent branches behaviour) (4.77 KB, patch)
2013-08-06 04:24 UTC, Srdjan Jankovic
Details | Diff | Splinter Review
Bug 5904: ysearch.pl members improvements (Independent branches behaviour) (1.88 KB, patch)
2013-08-30 14:18 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 5904: ysearch.pl members improvements (Independent branches behaviour) (1.92 KB, patch)
2013-09-02 00:18 UTC, Srdjan Jankovic
Details | Diff | Splinter Review
Bug 5904: ysearch.pl members improvements (Independent branches behaviour) (2.02 KB, patch)
2013-09-03 14:04 UTC, Kyle M Hall
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-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