From 5beeffea5d75448c30770f2ff78c548604a12d78 Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Tue, 22 Oct 2019 11:10:59 +0200 Subject: [PATCH] Bug 23854: Fix failure on dates when editing a suggestion --- suggestion/suggestion.pl | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/suggestion/suggestion.pl b/suggestion/suggestion.pl index ed043083bd..fc3930d98b 100755 --- a/suggestion/suggestion.pl +++ b/suggestion/suggestion.pl @@ -122,8 +122,11 @@ $template->param('borrowernumber' => $borrowernumber); ## Operations ## if ( $op =~ /save/i ) { - $suggestion_only->{suggesteddate} = dt_from_string( $suggestion_only->{suggesteddate} ) - if $suggestion_only->{suggesteddate}; + + for my $date_key ( qw( suggesteddate manageddate accepteddate rejecteddate ) ) { + $suggestion_only->{$date_key} = dt_from_string( $suggestion_only->{$date_key} ) + if $suggestion_only->{$date_key}; + } if ( $suggestion_only->{"STATUS"} ) { if ( my $tmpstatus = lc( $suggestion_only->{"STATUS"} ) =~ /ACCEPTED|REJECTED/i ) { -- 2.11.0