Browse Source

Bug 23971: Rename pref with AcquisitionLog

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
master
Jonathan Druart 2 weeks ago
parent
commit
7e2679528e
10 changed files with 16 additions and 16 deletions
  1. +5
    -5
      C4/Acquisition.pm
  2. +1
    -1
      C4/UsageStats.pm
  3. +1
    -1
      Koha/Acquisition/Basket.pm
  4. +1
    -1
      Koha/EDI.pm
  5. +1
    -1
      acqui/addorder.pl
  6. +2
    -2
      installer/data/mysql/atomicupdate/bug_23971_AcqLog_pref.perl
  7. +1
    -1
      installer/data/mysql/mandatory/sysprefs.sql
  8. +1
    -1
      koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/logs.pref
  9. +2
    -2
      t/db_dependent/Acquisition.t
  10. +1
    -1
      t/db_dependent/Koha/Acquisition/Basket.t

+ 5
- 5
C4/Acquisition.pm View File

@@ -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',


+ 1
- 1
C4/UsageStats.pm View File

@@ -217,7 +217,7 @@ sub BuildReport {
TagsEnabled
CalendarFirstDayOfWeek
opaclanguagesdisplay
AcqLog
AcquisitionLog
AuthoritiesLog
BorrowersLog
CataloguingLog


+ 1
- 1
Koha/Acquisition/Basket.pm View File

@@ -203,7 +203,7 @@ sub close {
);

# Log the closure
if (C4::Context->preference("AcqLog")) {
if (C4::Context->preference("AcquisitionLog")) {
logaction(
'ACQUISITIONS',
'CLOSE_BASKET',


+ 1
- 1
Koha/EDI.pm View File

@@ -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',


+ 1
- 1
acqui/addorder.pl View File

@@ -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',


+ 2
- 2
installer/data/mysql/atomicupdate/bug_23971_AcqLog_pref.perl View File

@@ -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");
}

+ 1
- 1
installer/data/mysql/mandatory/sysprefs.sql View File

@@ -5,8 +5,8 @@ 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'),
('AcquisitionDetails', '1', '', 'Hide/Show acquisition details on the biblio detail page.', 'YesNo'),
('AcquisitionLog','0',NULL,'If ON, log acquisitions activity','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'),
('AdditionalFieldsInZ3950ResultSearch', '', NULL, 'Determines which MARC field/subfields are displayed in -Additional field- column in the result of a search Z3950', 'Free'),


+ 1
- 1
koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/logs.pref View File

@@ -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"


+ 2
- 2
t/db_dependent/Acquisition.t View File

@@ -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();

+ 1
- 1
t/db_dependent/Koha/Acquisition/Basket.t View File

@@ -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;


Loading…
Cancel
Save