Bugzilla – Attachment 129895 Details for
Bug 28967
Patrons with no checkouts report shows patrons from other libraries with IndependentBranches
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 28967: Patrons with no checkouts report shows patrons from other libraries with IndependentBranches
Bug-28967-Patrons-with-no-checkouts-report-shows-p.patch (text/plain), 2.03 KB, created by
The Minh Luong
on 2022-01-27 15:13:21 UTC
(
hide
)
Description:
Bug 28967: Patrons with no checkouts report shows patrons from other libraries with IndependentBranches
Filename:
MIME Type:
Creator:
The Minh Luong
Created:
2022-01-27 15:13:21 UTC
Size:
2.03 KB
patch
obsolete
>From ea70dae5cad98fcb29c95aa1abe32eeb0c1dfff2 Mon Sep 17 00:00:00 2001 >From: The Minh Luong <the-minh.luong@inlibro.com> >Date: Wed, 26 Jan 2022 16:22:19 -0500 >Subject: [PATCH] Bug 28967: Patrons with no checkouts report shows patrons > from other libraries with IndependentBranches > >When IndependentBranches is activated and a non-superlibrarian user looks at the "Patrons with no checkouts" report, it shows patrons from other libraries. > >To recreate: >1) Activate IndependentBranches, IndependentBranchesPatronModifications and IndependentBranchesTransfers >2) Create a staff user with limited permissions (NOT a superlibrarian), including reports permissions. Here are mine as an example > - circulate (all) > - catalogue > - borrowers > - delete_borrowers > - edit_borrowers > - reserveforothers (all) > - reports (all) >3) Create (or make sure you already have) a patron in another branch (if using an existing patron, make sure they have no checkouts or checkout history) >4) Log in as your limited staff patron >5) Go to Reports > Inactive > Patrons who haven't checked out >6) Don't put in any limitations and click Submit >-- The patron from the other library appears in the list >7) Try to search for that other patron in the patron module >-- The patron from the other library is inaccessible >8) Apply the patch >9) Notice that the limited patron can only see patrons from his own >library >--- > reports/borrowers_out.pl | 5 +++++ > 1 file changed, 5 insertions(+) > >diff --git a/reports/borrowers_out.pl b/reports/borrowers_out.pl >index 357719c407..44b4feb36e 100755 >--- a/reports/borrowers_out.pl >+++ b/reports/borrowers_out.pl >@@ -212,6 +212,11 @@ sub calculate { > $strcalc .= " , " . $dbh->quote($colfield) if ($colfield); > $strcalc .= " FROM borrowers "; > $strcalc .= "WHERE 1 "; >+ if(C4::Context->preference('IndependentBranches') && !C4::Context->IsSuperLibrarian()){ >+ $strcalc .= "AND branchcode = '".C4::Context->userenv->{branch}."' "; >+ } >+ >+ > my @query_args; > if ( @$filters[0] ) { > @$filters[0]=~ s/\*/%/g; >-- >2.25.1
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 28967
:
129837
|
129894
|
129895
|
140973
|
141945