From 95d9ec6a9c4e96587ca448cfabffae773ca58f16 Mon Sep 17 00:00:00 2001 From: Andrew Isherwood Date: Fri, 6 Dec 2019 11:35:00 +0000 Subject: [PATCH] Bug 23971: (follow-up) Add additional basket logging This patch adds additional basket logging as discussed in comment #14 - Basket reopening - Basket users (manager) modification - Basket header modification Signed-off-by: Holly Signed-off-by: Tomas Cohen Arazi --- C4/Acquisition.pm | 29 +++++++++++++++++++ .../prog/en/modules/tools/viewlog.tt | 5 +++- 2 files changed, 33 insertions(+), 1 deletion(-) diff --git a/C4/Acquisition.pm b/C4/Acquisition.pm index 76c68d43e6b..3f5140ac6a5 100644 --- a/C4/Acquisition.pm +++ b/C4/Acquisition.pm @@ -265,6 +265,15 @@ sub ReopenBasket { WHERE basketno = ? AND orderstatus NOT IN ( 'complete', 'cancelled' ) }, {}, $basketno); + + # Log the basket reopening + if (C4::Context->preference("AcqLog")) { + logaction( + 'ACQUISITIONS', + 'REOPEN_BASKET', + $basketno + ); + } return; } @@ -607,6 +616,16 @@ sub ModBasketHeader { $sth2->execute($contractnumber,$basketno); } + # Log the basket update + if (C4::Context->preference("AcqLog")) { + logaction( + 'ACQUISITIONS', + 'MODIFY_BASKET_HEADER', + $basketno + ); + } + + return; return; } @@ -787,6 +806,16 @@ sub ModBasketUsers { foreach my $basketuser_id (@basketusers_ids) { $sth->execute($basketno, $basketuser_id); } + + # Log the basket update + if (C4::Context->preference("AcqLog")) { + logaction( + 'ACQUISITIONS', + 'MODIFY_BASKET_USERS', + $basketno + ); + } + return; } diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/viewlog.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/viewlog.tt index 70db33d0745..8de402ed35d 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/viewlog.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/viewlog.tt @@ -104,8 +104,11 @@ [% CASE 'STATUS_CHANGE' %]Change ILL request status [% CASE 'ADD_BASKET' %]Create an acquisitions basket [% CASE 'MODIFY_BASKET' %]Modify an acquisitions basket +[% CASE 'MODIFY_BASKET_HEADER' %]Modify an acquisitions basket header +[% CASE 'MODIFY_BASKET_USERS' %]Modify an acquisitions basket's users [% CASE 'CLOSE_BASKET' %]Close an acquisitions basket [% CASE 'APPROVE_BASKET' %]Approve an acquisitions basket +[% CASE 'REOPEN_BASKET' %]Reopen an acquisitions basket [% CASE 'Run' %]Run [% CASE %][% action | html %] [% END %] @@ -180,7 +183,7 @@ [% END %] - [% FOREACH actx IN [ 'ADD' 'DELETE' 'MODIFY' 'ISSUE' 'RETURN' 'RENEW' 'CREATE' 'CANCEL' 'SUSPEND' 'RESUME' 'ADDCIRCMESSAGE' 'DELCIRCMESSAGE' 'STATUS_CHANGE' 'CHANGE PASS' 'Run' 'ADD_BASKET' 'MODIFY_BASKET' 'CLOSE_BASKET' 'APPROVE_BASKET' ] %] + [% FOREACH actx IN [ 'ADD' 'DELETE' 'MODIFY' 'ISSUE' 'RETURN' 'RENEW' 'CREATE' 'CANCEL' 'SUSPEND' 'RESUME' 'ADDCIRCMESSAGE' 'DELCIRCMESSAGE' 'STATUS_CHANGE' 'CHANGE PASS' 'Run' 'ADD_BASKET' 'MODIFY_BASKET' 'MODIFY_BASKET_HEADER' 'MODIFY_BASKET_USERS' 'CLOSE_BASKET' 'APPROVE_BASKET' 'REOPEN_BASKET' ] %] [% IF actions.grep(actx).size %] [% ELSE %] -- 2.29.0