From ad528312dcd296fc58bc4b62fefc0802b8b8557b Mon Sep 17 00:00:00 2001 From: Martin Renvoize Date: Thu, 16 May 2019 12:14:13 +0100 Subject: [PATCH] Bug 22905: A quick, but horrible, fix. 'branchcode' appears to be used as a uri param if displayby is set to branchcode. However, this also matches a field name in the suggestions table so the reverse mapping of params to suggestions fields catches it incorrectly. I believe this is the correct method for removing the incorrect assignment but the better fix would be to clean up the whole script and use unique params for filters. --- suggestion/suggestion.pl | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/suggestion/suggestion.pl b/suggestion/suggestion.pl index 845ed0ecca..54bde34c4f 100755 --- a/suggestion/suggestion.pl +++ b/suggestion/suggestion.pl @@ -188,6 +188,12 @@ elsif ($op=~/edit/) { $op ='save'; } elsif ($op eq "change" ) { + + # Remove branchcode which may have incorrectly come from the params block + # if displayby is set to branchcode + $displayby||="STATUS"; + delete $$suggestion_ref{'branchcode'} if($displayby eq "branchcode"); + # set accepted/rejected/managed informations if applicable # ie= if the librarian has chosen some action on the suggestions if ($suggestion_only->{"STATUS"} eq "ACCEPTED"){ -- 2.20.1