From a56e1e1729fbbc1b341bbad7c2fcf94d4642806f Mon Sep 17 00:00:00 2001 From: Paul Poulain Date: Mon, 4 Apr 2011 16:28:44 +0200 Subject: [PATCH] Bug 6045: Accepted by is empty when accepting from list Signed-off-by: Katrin Fischer Signed-off-by: Chris Cormack --- suggestion/suggestion.pl | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/suggestion/suggestion.pl b/suggestion/suggestion.pl index 44d65edea4..f5202e4b75 100755 --- a/suggestion/suggestion.pl +++ b/suggestion/suggestion.pl @@ -138,11 +138,16 @@ elsif ($op=~/edit/) { $op ='save'; } elsif ($op eq "change" ) { + # set accepted/rejected/managed informations if applicable + # ie= if the librarian has choosen some action on the suggestions + if ($$suggestion_ref{"STATUS"} eq "ACCEPTED"){ + $$suggestion_ref{"accepteddate"}=C4::Dates->today; + $$suggestion_ref{"acceptedby"}=C4::Context->userenv->{number}; + } elsif ($$suggestion_ref{"STATUS"} eq "REJECTED"){ + $$suggestion_ref{"rejecteddate"}=C4::Dates->today; + $$suggestion_ref{"rejectedby"}=C4::Context->userenv->{number}; + } if ($$suggestion_ref{"STATUS"}){ - if (my $tmpstatus=lc($$suggestion_ref{"STATUS"}) =~/ACCEPTED|REJECTED/i){ - $$suggestion_ref{"$tmpstatus"."date"}=C4::Dates->today; - $$suggestion_ref{"$tmpstatus"."by"}=C4::Context->userenv->{number}; - } $$suggestion_ref{"manageddate"}=C4::Dates->today; $$suggestion_ref{"managedby"}=C4::Context->userenv->{number}; } -- 2.39.5