Bugzilla – Attachment 112303 Details for
Bug 23971
Add logging for basket related actions
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 23971: (follow-up) Respond to feedback
Bug-23971-follow-up-Respond-to-feedback.patch (text/plain), 2.42 KB, created by
Tomás Cohen Arazi (tcohen)
on 2020-10-23 18:35:44 UTC
(
hide
)
Description:
Bug 23971: (follow-up) Respond to feedback
Filename:
MIME Type:
Creator:
Tomás Cohen Arazi (tcohen)
Created:
2020-10-23 18:35:44 UTC
Size:
2.42 KB
patch
obsolete
>From f11ce60780070e608458e478e7d0857816721989 Mon Sep 17 00:00:00 2001 >From: Andrew Isherwood <andrew.isherwood@ptfs-europe.com> >Date: Mon, 19 Oct 2020 10:48:57 +0100 >Subject: [PATCH] Bug 23971: (follow-up) Respond to feedback > >As requested by Jonathan in commit #28: > >- We now no longer pass a flag to CloseBasket indicating if the closure >was due to an EDI basket approval, we log the closure and approval as >separate events. > >Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> >--- > C4/Acquisition.pm | 5 ++--- > Koha/EDI.pm | 14 +++++++++++--- > 2 files changed, 13 insertions(+), 6 deletions(-) > >diff --git a/C4/Acquisition.pm b/C4/Acquisition.pm >index 0682020f067..d5a46144c51 100644 >--- a/C4/Acquisition.pm >+++ b/C4/Acquisition.pm >@@ -224,7 +224,7 @@ close a basket (becomes unmodifiable, except for receives) > =cut > > sub CloseBasket { >- my ($basketno, $edi_approval) = @_; >+ my ($basketno) = @_; > my $dbh = C4::Context->dbh; > $dbh->do('UPDATE aqbasket SET closedate=now() WHERE basketno=?', {}, $basketno ); > >@@ -235,10 +235,9 @@ q{UPDATE aqorders SET orderstatus = 'ordered' WHERE basketno = ? AND orderstatus > > # Log the closure > if (C4::Context->preference("AcqLog")) { >- my $action = $edi_approval ? 'APPROVE_BASKET' : 'CLOSE_BASKET'; > logaction( > 'ACQUISITIONS', >- $action, >+ 'CLOSE_BASKET', > $basketno > ); > } >diff --git a/Koha/EDI.pm b/Koha/EDI.pm >index 088676961a0..70f17594e45 100644 >--- a/Koha/EDI.pm >+++ b/Koha/EDI.pm >@@ -33,6 +33,7 @@ use C4::Suggestions qw( ModSuggestion ); > use C4::Biblio qw( AddBiblio TransformKohaToMarc GetMarcBiblio GetFrameworkCode GetMarcFromKohaField ); > use Koha::Edifact::Order; > use Koha::Edifact; >+use C4::Log qw(logaction); > use Log::Log4perl; > use Text::Unidecode; > use Koha::Plugins::Handler; >@@ -592,9 +593,16 @@ sub process_quote { > basketno => $b, > } > ); >- # Close the basket, passing a flag indicating that this action >- # originated from an approval >- CloseBasket($b, 1); >+ # Close the basket >+ CloseBasket($b); >+ # Log the approval of this basket >+ if (C4::Context->preference("AcqLog")) { >+ logaction( >+ 'ACQUISITIONS', >+ 'APPROVE_BASKET', >+ $b >+ ); >+ } > } > } > >-- >2.29.0
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 23971
:
95285
|
95286
|
95885
|
95888
|
96063
|
96064
|
100239
|
100240
|
100241
|
103911
|
103912
|
103913
|
103945
|
108962
|
111300
|
111301
|
111302
|
111303
|
111304
|
111955
|
111956
|
111957
|
111958
|
111959
|
111960
|
112277
|
112278
|
112279
|
112280
|
112281
|
112282
|
112283
|
112284
|
112285
|
112286
|
112287
|
112288
|
112289
|
112290
|
112291
|
112298
|
112299
|
112300
|
112301
|
112302
|
112303
|
112304
|
112305
|
112306
|
112307
|
113384
|
113385
|
113386
|
113387
|
113388
|
113389
|
113390
|
113391
|
113392
|
113393
|
114857
|
114858
|
114859
|
114860
|
114861
|
114862
|
114863
|
114864
|
114865
|
114866
|
114867
|
114905
|
114906
|
114907
|
114908
|
114909
|
114910
|
114911
|
114912
|
114913
|
114914
|
114915
|
114916
|
115976
|
115977
|
115978
|
115979
|
115980
|
115981
|
115982
|
115983
|
115984
|
115985
|
115986
|
119401
|
119402
|
119403
|
119404
|
119405
|
119406
|
119407
|
119408
|
119409
|
119410
|
119411
|
119412
|
119944
|
119946
|
120048