From 25db5abdfd3add34f1aad436f8fca4eaff1af885 Mon Sep 17 00:00:00 2001 From: Kyle M Hall Date: Wed, 21 Jun 2023 10:51:03 -0400 Subject: [PATCH] Bug 34080 - Updating suggestion status can result in 500 error Sometimes using "Mark selection as" to update a suggestions can result in a 500 error with the logged error: DBIx::Class::Storage::DBI::_dbh_execute(): DBI Exception: DBD::mysql::st execute failed: Unknown column 'suggestion_itemtype' in 'where clause' at /usr/share/koha/lib/Koha/Objects.pm line 394 It appears that the search params are built from *all* the form fields and then some form fields are removed from the hashref, but not all ( hence the error ). --- suggestion/suggestion.pl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/suggestion/suggestion.pl b/suggestion/suggestion.pl index b2cbf3a639..b66525bac8 100755 --- a/suggestion/suggestion.pl +++ b/suggestion/suggestion.pl @@ -376,7 +376,7 @@ if ($op=~/else/) { my @allsuggestions; foreach my $criteriumvalue ( @criteria_dv ) { - my $search_params = {%$suggestion_ref}; + my $search_params = {%$suggestion_only}; next if $search_params->{STATUS} -- 2.30.2