Skip to content

Commit

Permalink
Bug 9226: Wrong branch filter after suggestion creation
Browse files Browse the repository at this point in the history
Signed-off-by: Owen Leonard <oleonard@myacpl.org>

Before the patch, upon submitting a new suggestion in the staff client I
was redirected to a view which was not filtered by branch. After the
patch I was redirected to a view which was filtered by my logged-in
branch.
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
  • Loading branch information
Fridolyn SOMERS authored and jcamins committed Feb 15, 2013
1 parent cec7c3c commit fe48757
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions suggestion/suggestion.pl
Expand Up @@ -82,7 +82,6 @@ sub GetCriteriumDesc{
my $returnsuggested = $input->param('returnsuggested');
my $managedby = $input->param('managedby');
my $displayby = $input->param('displayby') || '';
my $branchfilter = ($displayby ne "branchcode") ? $input->param('branchcode') : '';
my $tabcode = $input->param('tabcode');

# filter informations which are not suggestion related.
Expand Down Expand Up @@ -207,7 +206,7 @@ sub GetCriteriumDesc{
my $reasonsloop = GetAuthorisedValues("SUGGEST");
foreach my $criteriumvalue ( @criteria_dv ) {
# By default, display suggestions from current working branch
if(not defined $branchfilter) {
unless ( exists $$suggestion_ref{'branchcode'} ) {
$$suggestion_ref{'branchcode'} = C4::Context->userenv->{'branch'};
}
my $definedvalue = defined $$suggestion_ref{$displayby} && $$suggestion_ref{$displayby} ne "";
Expand Down Expand Up @@ -276,6 +275,7 @@ sub GetCriteriumDesc{
## Initializing selection lists

#branch display management
my $branchfilter = ($displayby ne "branchcode") ? $input->param('branchcode') : '';
my $onlymine=C4::Context->preference('IndependantBranches') &&
C4::Context->userenv &&
C4::Context->userenv->{flags}!=1 &&
Expand Down

0 comments on commit fe48757

Please sign in to comment.