Bug 25033: (follow-up) Don't delete branchcode key from suggestion_ref
authorNick Clemens <nick@bywatersolutions.com>
Wed, 5 Aug 2020 11:50:39 +0000 (11:50 +0000)
committerJonathan Druart <jonathan.druart@bugs.koha-community.org>
Tue, 25 Aug 2020 09:31:42 +0000 (11:31 +0200)
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
suggestion/suggestion.pl

index 560a524..48527ae 100755 (executable)
@@ -219,7 +219,7 @@ if ( $op =~ /save/i ) {
             }
             # empty fields, to avoid filter in "SearchSuggestion"
         }
-        map{delete $$suggestion_ref{$_}} keys %$suggestion_ref;
+        map{delete $$suggestion_ref{$_} unless $_ eq 'branchcode' } keys %$suggestion_ref;
         $op = 'else';
 
         if( $redirect eq 'purchase_suggestions' ) {
@@ -324,7 +324,7 @@ elsif ( $op eq 'show' ) {
 }
 if ($op=~/else/) {
     $op='else';
-    
+
     $displayby||="STATUS";
     # distinct values of display by
     my $criteria_list=GetDistinctValues("suggestions.".$displayby);