Bugzilla – Attachment 67046 Details for
Bug 12346
False patron modification alerts on members-home.pl
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bgu 12346: Display the correct number of pending patron modifications on the patron module home page
Bgu-12346-Display-the-correct-number-of-pending-pa.patch (text/plain), 2.48 KB, created by
Tomás Cohen Arazi (tcohen)
on 2017-09-11 14:50:25 UTC
(
hide
)
Description:
Bgu 12346: Display the correct number of pending patron modifications on the patron module home page
Filename:
MIME Type:
Creator:
Tomás Cohen Arazi (tcohen)
Created:
2017-09-11 14:50:25 UTC
Size:
2.48 KB
patch
obsolete
>From 4f6d7c59689f8dfcf21ea4b45aae7f45ab6a2f14 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Wed, 6 Sep 2017 11:23:10 -0300 >Subject: [PATCH] Bgu 12346: Display the correct number of pending patron > modifications on the patron module home page > >Due to the way members-home.pl handles the variable $branch, the number >of patron modifications listed on members-home.pl may differ from the >number listed on mainpage.pl. When the librarian clicks this link, he or >she may see a different number than was listed, or none at all! > >Test Plan: >0) Set IndependentBranchesPatronModifications = Yes >1) Create a number of modification request for BranchA >2) Log into the staff intranet with a patron without superlibrarian >permissions and set your branch to BranchB >3) Note the modifications alert to does not display on mainpage.pl >4) Click the "Patrons" link to take you to members-home.pl >5) Note the modifictions alert does display on this page >6) Apply this patch >7) Reload members-home.pl, note the alert no longer displays > >QA notes: What was the point of the branch variable? > >Followed test plan, patch worked as described. Also passed QA test tool >Signed-off-by: Alex Buckley <alexbuckley@catalyst.net.nz> >Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> >--- > members/members-home.pl | 14 ++++++++------ > 1 file changed, 8 insertions(+), 6 deletions(-) > >diff --git a/members/members-home.pl b/members/members-home.pl >index 5e474bb..fcd8eb1 100755 >--- a/members/members-home.pl >+++ b/members/members-home.pl >@@ -30,11 +30,8 @@ use Koha::List::Patron; > use Koha::Patron::Categories; > > my $query = new CGI; >-my $branch = $query->param('branchcode'); > >-$branch = q{} unless defined $branch; >- >-my ($template, $loggedinuser, $cookie) >+my ($template, $loggedinuser, $cookie, $flags) > = get_template_and_user({template_name => "members/member.tt", > query => $query, > type => "intranet", >@@ -58,9 +55,14 @@ else { > $template->param(categories=>\@categories); > } > >+my $branch = >+ ( C4::Context->preference("IndependentBranchesPatronModifications") >+ || C4::Context->preference("IndependentBranches") ) >+ && !$flags->{'superlibrarian'} >+ ? C4::Context->userenv()->{'branch'} >+ : undef; > >-my $pending_borrower_modifications = >- Koha::Patron::Modifications->pending_count( $branch ); >+my $pending_borrower_modifications = Koha::Patron::Modifications->pending_count( $branch ); > > $template->param( > no_add => $no_add, >-- >2.7.4
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 12346
:
28621
|
66880
|
66966
| 67046