Bugzilla – Attachment 119944 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: Rename pref with AcquisitionLog
Bug-23971-Rename-pref-with-AcquisitionLog.patch (text/plain), 8.44 KB, created by
Jonathan Druart
on 2021-04-21 12:27:03 UTC
(
hide
)
Description:
Bug 23971: Rename pref with AcquisitionLog
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2021-04-21 12:27:03 UTC
Size:
8.44 KB
patch
obsolete
>From c7982e06879e1c3c2bd19345e83a1cdfdafee99a Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Wed, 21 Apr 2021 14:26:19 +0200 >Subject: [PATCH] Bug 23971: Rename pref with AcquisitionLog > >--- > C4/Acquisition.pm | 10 +++++----- > C4/UsageStats.pm | 2 +- > Koha/Acquisition/Basket.pm | 2 +- > Koha/EDI.pm | 2 +- > acqui/addorder.pl | 2 +- > .../data/mysql/atomicupdate/bug_23971_AcqLog_pref.perl | 4 ++-- > installer/data/mysql/mandatory/sysprefs.sql | 2 +- > .../prog/en/modules/admin/preferences/logs.pref | 2 +- > t/db_dependent/Acquisition.t | 4 ++-- > t/db_dependent/Koha/Acquisition/Basket.t | 2 +- > 10 files changed, 16 insertions(+), 16 deletions(-) > >diff --git a/C4/Acquisition.pm b/C4/Acquisition.pm >index 5652f2b2f1..4ef7dd07c5 100644 >--- a/C4/Acquisition.pm >+++ b/C4/Acquisition.pm >@@ -207,7 +207,7 @@ sub NewBasket { > $basketcontractnumber, $booksellerid, $deliveryplace, $billingplace, $is_standing, $create_items ); > > # Log the basket creation >- if (C4::Context->preference("AcqLog")) { >+ if (C4::Context->preference("AcquisitionLog")) { > my $created = Koha::Acquisition::Baskets->find( $basket ); > logaction( > 'ACQUISITIONS', >@@ -241,7 +241,7 @@ sub ReopenBasket { > }, {}, $basketno); > > # Log the basket reopening >- if (C4::Context->preference("AcqLog")) { >+ if (C4::Context->preference("AcquisitionLog")) { > my $reopened = Koha::Acquisition::Baskets->find( $basketno ); > logaction( > 'ACQUISITIONS', >@@ -526,7 +526,7 @@ sub ModBasket { > $sth->execute(@params); > > # Log the basket update >- if (C4::Context->preference("AcqLog")) { >+ if (C4::Context->preference("AcquisitionLog")) { > my $modified = Koha::Acquisition::Baskets->find( > $basketinfo->{basketno} > ); >@@ -597,7 +597,7 @@ sub ModBasketHeader { > } > > # Log the basket update >- if (C4::Context->preference("AcqLog")) { >+ if (C4::Context->preference("AcquisitionLog")) { > my $modified = Koha::Acquisition::Baskets->find( > $basketno > ); >@@ -791,7 +791,7 @@ sub ModBasketUsers { > } > > # Log the basket update >- if (C4::Context->preference("AcqLog")) { >+ if (C4::Context->preference("AcquisitionLog")) { > logaction( > 'ACQUISITIONS', > 'MODIFY_BASKET_USERS', >diff --git a/C4/UsageStats.pm b/C4/UsageStats.pm >index b37c279b4d..a74dd1fac0 100644 >--- a/C4/UsageStats.pm >+++ b/C4/UsageStats.pm >@@ -217,7 +217,7 @@ sub BuildReport { > TagsEnabled > CalendarFirstDayOfWeek > opaclanguagesdisplay >- AcqLog >+ AcquisitionLog > AuthoritiesLog > BorrowersLog > CataloguingLog >diff --git a/Koha/Acquisition/Basket.pm b/Koha/Acquisition/Basket.pm >index b2e038a846..4f10557901 100644 >--- a/Koha/Acquisition/Basket.pm >+++ b/Koha/Acquisition/Basket.pm >@@ -203,7 +203,7 @@ sub close { > ); > > # Log the closure >- if (C4::Context->preference("AcqLog")) { >+ if (C4::Context->preference("AcquisitionLog")) { > logaction( > 'ACQUISITIONS', > 'CLOSE_BASKET', >diff --git a/Koha/EDI.pm b/Koha/EDI.pm >index 14f61c79ac..af31039772 100644 >--- a/Koha/EDI.pm >+++ b/Koha/EDI.pm >@@ -623,7 +623,7 @@ sub process_quote { > ); > Koha::Acquisition::Baskets->find($b)->close; > # Log the approval >- if (C4::Context->preference("AcqLog")) { >+ if (C4::Context->preference("AcquisitionLog")) { > my $approved = Koha::Acquisition::Baskets->find( $b ); > logaction( > 'ACQUISITIONS', >diff --git a/acqui/addorder.pl b/acqui/addorder.pl >index 74da873128..417c57d261 100755 >--- a/acqui/addorder.pl >+++ b/acqui/addorder.pl >@@ -363,7 +363,7 @@ if ( $basket->{is_standing} || $orderinfo->{quantity} ne '0' ) { > > } > >-if (C4::Context->preference("AcqLog") && $basketno) { >+if (C4::Context->preference("AcquisitionLog") && $basketno) { > my $modified = Koha::Acquisition::Baskets->find( $basketno ); > logaction( > 'ACQUISITIONS', >diff --git a/installer/data/mysql/atomicupdate/bug_23971_AcqLog_pref.perl b/installer/data/mysql/atomicupdate/bug_23971_AcqLog_pref.perl >index ea23018b12..e612c0c298 100644 >--- a/installer/data/mysql/atomicupdate/bug_23971_AcqLog_pref.perl >+++ b/installer/data/mysql/atomicupdate/bug_23971_AcqLog_pref.perl >@@ -1,6 +1,6 @@ > $DBversion = 'XXX'; # will be replaced by the RM > if( CheckVersion( $DBversion ) ) { >- $dbh->do( q| INSERT IGNORE INTO systempreferences (variable, value, explanation, options, type) VALUES ('AcqLog', '0', 'If enabled, log acquisition activity', '', 'YesNo'); | ); >+ $dbh->do( q| INSERT IGNORE INTO systempreferences (variable, value, explanation, options, type) VALUES ('AcquisitionLog', '0', 'If enabled, log acquisition activity', '', 'YesNo'); | ); > >- NewVersion( $DBversion, 23971, "Add AcqLog syspref"); >+ NewVersion( $DBversion, 23971, "Add AcquisitionLog syspref"); > } >diff --git a/installer/data/mysql/mandatory/sysprefs.sql b/installer/data/mysql/mandatory/sysprefs.sql >index a6f41048f3..fda747dd32 100644 >--- a/installer/data/mysql/mandatory/sysprefs.sql >+++ b/installer/data/mysql/mandatory/sysprefs.sql >@@ -5,7 +5,7 @@ INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` > ('AcqEnableFiles','0',NULL,'If enabled, allows librarians to upload and attach arbitrary files to invoice records.','YesNo'), > ('AcqItemSetSubfieldsWhenReceiptIsCancelled','', '','Upon cancelling a receipt, update the items subfields if they were created when placing an order (e.g. o=5|a="bar foo")', 'Free'), > ('AcqItemSetSubfieldsWhenReceived','','','Upon receiving items, update their subfields if they were created when placing an order (e.g. o=5|a="foo bar")','Free'), >-('AcqLog','0',NULL,'If ON, log acquisitions activity','YesNo'), >+('AcquisitionLog','0',NULL,'If ON, log acquisitions activity','YesNo'), > ('AcquisitionDetails', '1', '', 'Hide/Show acquisition details on the biblio detail page.', 'YesNo'), > ('AcqViewBaskets','user','user|branch|all','Define which baskets a user is allowed to view: their own only, any within their branch, or all','Choice'), > ('AcqWarnOnDuplicateInvoice','0','','Warn librarians when they try to create a duplicate invoice','YesNo'), >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/logs.pref b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/logs.pref >index 6987a9edbf..0a996fa176 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/logs.pref >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/logs.pref >@@ -43,7 +43,7 @@ Logging: > 0: "Don't log" > - when changes to ILL requests take place. > - >- - pref: AcqLog >+ - pref: AcquisitionLog > choices: > on: Log > off: "Don't log" >diff --git a/t/db_dependent/Acquisition.t b/t/db_dependent/Acquisition.t >index d39d70334e..6fe9ede74c 100755 >--- a/t/db_dependent/Acquisition.t >+++ b/t/db_dependent/Acquisition.t >@@ -903,7 +903,7 @@ subtest 'Acquisition logging' => sub { > > plan tests => 5; > >- t::lib::Mocks::mock_preference('AcqLog', 1); >+ t::lib::Mocks::mock_preference('AcquisitionLog', 1); > > Koha::ActionLogs->delete; > my $basketno = NewBasket( $booksellerid, 1 ); >@@ -933,7 +933,7 @@ subtest 'Acquisition logging' => sub { > my @mod_users_logs = Koha::ActionLogs->search({ module =>'ACQUISITIONS', action => 'MODIFY_BASKET_USERS', object => $basketno }); > is (scalar @mod_users_logs, 1, 'Basket users modify is logged'); > >- t::lib::Mocks::mock_preference('AcqLog', 0); >+ t::lib::Mocks::mock_preference('AcquisitionLog', 0); > }; > > $schema->storage->txn_rollback(); >diff --git a/t/db_dependent/Koha/Acquisition/Basket.t b/t/db_dependent/Koha/Acquisition/Basket.t >index ca25462e13..7b6c17d552 100755 >--- a/t/db_dependent/Koha/Acquisition/Basket.t >+++ b/t/db_dependent/Koha/Acquisition/Basket.t >@@ -338,7 +338,7 @@ subtest 'close() tests' => sub { > plan tests => 4; > > # Turn on acquisitions logging and ensure the logs are empty >- t::lib::Mocks::mock_preference('AcqLog', 1); >+ t::lib::Mocks::mock_preference('AcquisitionLog', 1); > Koha::ActionLogs->delete; > > $schema->storage->txn_begin; >-- >2.20.1
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