[Koha-patches] [PATCH] [SIGNED-OFF] Bug 6045: Accepted by is empty when accepting from list
Katrin Fischer
Katrin.Fischer.83 at web.de
Mon Apr 4 16:28:44 CEST 2011
From: Paul Poulain <paul.poulain at biblibre.com>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83 at web.de>
---
suggestion/suggestion.pl | 13 +++++++++----
1 files changed, 9 insertions(+), 4 deletions(-)
diff --git a/suggestion/suggestion.pl b/suggestion/suggestion.pl
index 44d65ed..f5202e4 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};
}
--
1.7.1
More information about the Koha-patches
mailing list