From 5a05682fbcc53e1b4c82ff720b79ce8b96a7a69e 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 (cherry picked from commit a56e1e1729fbbc1b341bbad7c2fcf94d4642806f) Signed-off-by: Chris Nighswonger --- suggestion/suggestion.pl | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/suggestion/suggestion.pl b/suggestion/suggestion.pl index 8ca17d01a1..c5a860ffea 100755 --- a/suggestion/suggestion.pl +++ b/suggestion/suggestion.pl @@ -126,11 +126,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