Bug 20998 - Non superlibrarians cannot search for patrons using the quicksearch at the top
Summary: Non superlibrarians cannot search for patrons using the quicksearch at the top
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Staff interface (show other bugs)
Version: master
Hardware: All All
: P5 - low critical (vote)
Assignee: Nick Clemens
QA Contact: Tomás Cohen Arazi
URL:
Keywords:
Depends on: 17829
Blocks:
  Show dependency treegraph
 
Reported: 2018-06-26 15:01 UTC by Nick Clemens
Modified: 2019-10-14 19:56 UTC (History)
6 users (show)

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


Attachments
Bug 20998: Only perform quicksearch if patron found with cardnumber (1.35 KB, patch)
2018-06-26 15:04 UTC, Nick Clemens
Details | Diff | Splinter Review
Bug 20998: Only perform quicksearch if patron found with cardnumber (1.43 KB, patch)
2018-06-26 15:37 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 20998: Simplify the conditional statement (1.22 KB, patch)
2018-06-26 15:37 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 20998: Only perform quicksearch if patron found with cardnumber (1.48 KB, patch)
2018-06-26 17:50 UTC, Owen Leonard
Details | Diff | Splinter Review
Bug 20998: Simplify the conditional statement (1.26 KB, patch)
2018-06-26 17:50 UTC, Owen Leonard
Details | Diff | Splinter Review
Bug 20998: Only perform quicksearch if patron found with cardnumber (1.54 KB, patch)
2018-06-27 14:20 UTC, Tomás Cohen Arazi
Details | Diff | Splinter Review
Bug 20998: Simplify the conditional statement (1.32 KB, patch)
2018-06-27 14:20 UTC, Tomás Cohen Arazi
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Nick Clemens 2018-06-26 15:01:49 UTC
To recreate:
1 - Enable 'IndependentBranches'
2 - Setup a patron with all permissions, but not a superlibrarian
3 - Login to staff client as that patron
4 - Click 'Patrons' in the toolbar and try a search
5 - Internal server error
Comment 1 Nick Clemens 2018-06-26 15:04:32 UTC Comment hidden (obsolete)
Comment 2 Jonathan Druart 2018-06-26 15:37:47 UTC Comment hidden (obsolete)
Comment 3 Jonathan Druart 2018-06-26 15:37:50 UTC Comment hidden (obsolete)
Comment 4 Jonathan Druart 2018-06-26 15:39:23 UTC
Upping severity, that's clearly critical for installations with IndependentBranches.
I have added a follow-up to simplify the conditional statement.

Caused by
  commit 2b90ea2cb0e5e976de7ddef0151ae83d8ac578e6
  Bug 17829: Move GetMember to Koha::Patron
Comment 5 Owen Leonard 2018-06-26 17:50:11 UTC
Created attachment 76466 [details] [review]
Bug 20998: Only perform quicksearch if patron found with cardnumber

This patch makes sure we have a patron before we try to access their
branchcode and allows search to work

To recreate:
1 - Enable 'IndependentBranches'
2 - Setup a patron with all permissions, but not a superlibrarian
3 - Login to staff client as that patron
4 - Click 'Patrons' in the toolbar and try a search
5 - Internal server error
6 - Apply patch
7 - Try the search again
8 - Success!

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Comment 6 Owen Leonard 2018-06-26 17:50:15 UTC
Created attachment 76467 [details] [review]
Bug 20998: Simplify the conditional statement

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Comment 7 Tomás Cohen Arazi 2018-06-27 14:20:49 UTC
Created attachment 76517 [details] [review]
Bug 20998: Only perform quicksearch if patron found with cardnumber

This patch makes sure we have a patron before we try to access their
branchcode and allows search to work

To recreate:
1 - Enable 'IndependentBranches'
2 - Setup a patron with all permissions, but not a superlibrarian
3 - Login to staff client as that patron
4 - Click 'Patrons' in the toolbar and try a search
5 - Internal server error
6 - Apply patch
7 - Try the search again
8 - Success!

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Comment 8 Tomás Cohen Arazi 2018-06-27 14:20:54 UTC
Created attachment 76518 [details] [review]
Bug 20998: Simplify the conditional statement

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Comment 9 Nick Clemens 2018-06-29 21:01:12 UTC
Awesome work all!

Pushed to master for 18.11
Comment 10 Barton Chittenden 2018-06-29 23:01:17 UTC
Request for back-port (issue first occurs in 17.11, I believe)
Comment 11 Martin Renvoize 2018-07-02 07:18:29 UTC
Pushed to 18.05.x for 18.05.02
Comment 12 Fridolin Somers 2018-07-04 06:50:16 UTC
Pushed to 17.11.x for 17.11.08
Comment 13 Fridolin Somers 2018-07-04 06:54:08 UTC
Depends on Bug 17829 not in 17.05.x