Bugzilla – Attachment 68298 Details for
Bug 18743
Filter suggestion lists correctly for IndependentBranches
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 18743 - ALTERNATE: Take IndependantBranches syspref into account
Bug-18743---ALTERNATE-Take-IndependantBranches-sys.patch (text/plain), 1.96 KB, created by
David Bourgault
on 2017-10-19 18:06:39 UTC
(
hide
)
Description:
Bug 18743 - ALTERNATE: Take IndependantBranches syspref into account
Filename:
MIME Type:
Creator:
David Bourgault
Created:
2017-10-19 18:06:39 UTC
Size:
1.96 KB
patch
obsolete
>From 75f5a5334cf002cf607be2b9677783e9cb14181d Mon Sep 17 00:00:00 2001 >From: Unknown <dav.bour@gmail.com> >Date: Thu, 19 Oct 2017 13:42:08 -0400 >Subject: [PATCH] Bug 18743 - ALTERNATE: Take IndependantBranches syspref into > account > >--- >THIS IS AN ALTERNATE PATCH >I am submitting it here, because it covers less than Alex's patch, but does so in a simpler fashion. >APPLY ONLY THIS PATCH, OR THE OTHER, NOT BOTH. >--- > >Displays suggestions for all libraries when IndependantBranches is set to no, or user is Super librarian by adding a missing if statement. > >TEST PLAN >[0] Apply patch >[1] Set IndependentBranches to 'Yes'. >[2] Create a suggestion with a user from branch A. >[3] As a superlibrarian, visit the suggestion page, you should see the suggestion. >[4] As staff from branch A, visit the sugg. page, you should see the suggestion. >[5] As staff from branch B, visit the sugg. pase, you should NOT see the suggestion. >[6] Set IndependentBranches to 'No'. >[7] Redo step 3-5. You should always see the suggestion. >[8] Sign-off. >[9] Have fun. >--- > suggestion/suggestion.pl | 6 ++++-- > 1 file changed, 4 insertions(+), 2 deletions(-) > >diff --git a/suggestion/suggestion.pl b/suggestion/suggestion.pl >index 94e6eab..c13f57d 100755 >--- a/suggestion/suggestion.pl >+++ b/suggestion/suggestion.pl >@@ -261,8 +261,10 @@ if ($op=~/else/) { > my @allsuggestions; > foreach my $criteriumvalue ( @criteria_dv ) { > # By default, display suggestions from current working branch >- unless ( exists $$suggestion_ref{'branchcode'} ) { >- $$suggestion_ref{'branchcode'} = C4::Context->userenv->{'branch'}; >+ if (C4::Context->preference('IndependentBranches') && !C4::Context->IsSuperLibrarian()) { >+ unless ( exists $$suggestion_ref{'branchcode'} ) { >+ $$suggestion_ref{'branchcode'} = C4::Context->userenv->{'branch'}; >+ } > } > my $definedvalue = defined $$suggestion_ref{$displayby} && $$suggestion_ref{$displayby} ne ""; > >-- >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 18743
:
64742
|
64763
|
64768
|
68298
|
71030
|
72637
|
72679
|
94300
|
94417
|
94418
|
94515
|
94516
|
94737
|
94738
|
94739
|
94740
|
94741
|
94742