View | Details | Raw Unified | Return to bug 14233
Collapse All | Expand All

(-)a/C4/Letters.pm (-2 / +2 lines)
Lines 534-540 sub SendAlerts { Link Here
534
            unless $success;
534
            unless $success;
535
535
536
        logaction(
536
        logaction(
537
            "CLAIMS",
537
            "ACQUISITIONS",
538
            $action,
538
            $action,
539
            undef,
539
            undef,
540
            "To="
540
            "To="
Lines 543-549 sub SendAlerts { Link Here
543
                . $letter->{title}
543
                . $letter->{title}
544
                . " Content="
544
                . " Content="
545
                . $letter->{content}
545
                . $letter->{content}
546
        ) if C4::Context->preference("ClaimsLog");
546
        ) if C4::Context->preference("AcquisitionsLog");
547
    }
547
    }
548
   # send an "account details" notice to a newly created user
548
   # send an "account details" notice to a newly created user
549
    elsif ( $type eq 'members' ) {
549
    elsif ( $type eq 'members' ) {
(-)a/C4/UsageStats.pm (-1 / +1 lines)
Lines 222-228 sub BuildReport { Link Here
222
        CataloguingLog
222
        CataloguingLog
223
        FinesLog
223
        FinesLog
224
        IssueLog
224
        IssueLog
225
        ClaimsLog
225
        AcquisitionsLog
226
        ReturnLog
226
        ReturnLog
227
        SubscriptionLog
227
        SubscriptionLog
228
        BiblioDefaultView
228
        BiblioDefaultView
(-)a/installer/data/mysql/atomicupdate/bug_14233.perl (-13 lines)
Lines 11-29 q{ALTER TABLE letter ADD UNIQUE KEY letter_uniq_1 (`module`,`code`,`branchcode`, Link Here
11
        );
11
        );
12
    }
12
    }
13
13
14
    $dbh->do(q{
15
    UPDATE
16
      action_logs
17
    SET
18
      module = 'CLAIMS'
19
    WHERE
20
      module = 'ACQUISITIONS'
21
    AND (
22
      action = 'SERIAL CLAIM'
23
      OR action = 'ACQUISITION ORDER'
24
      OR action = 'ACQUISITION CLAIM'
25
    )});
26
27
    $dbh->do(q{
14
    $dbh->do(q{
28
        INSERT IGNORE INTO systempreferences (variable, value, explanation, options, type)
15
        INSERT IGNORE INTO systempreferences (variable, value, explanation, options, type)
29
        VALUES ('NoticesLog','',NULL,'If enabled, log changes to notice templates','YesNo')
16
        VALUES ('NoticesLog','',NULL,'If enabled, log changes to notice templates','YesNo')
(-)a/installer/data/mysql/mandatory/sysprefs.sql (-1 / +1 lines)
Lines 294-300 INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` Link Here
294
('KohaManualLanguage','en','en|ar|cs|de|es|fr|it|pt_BR|tr|zh_TW','What is the language of the online manual you want to use?','Choice'),
294
('KohaManualLanguage','en','en|ar|cs|de|es|fr|it|pt_BR|tr|zh_TW','What is the language of the online manual you want to use?','Choice'),
295
('LabelMARCView','standard','standard|economical','Define how a MARC record will display','Choice'),
295
('LabelMARCView','standard','standard|economical','Define how a MARC record will display','Choice'),
296
('language','en',NULL,'Set the default language in the staff interface.','Languages'),
296
('language','en',NULL,'Set the default language in the staff interface.','Languages'),
297
('ClaimsLog','1',NULL,'If ON, log all notices sent','YesNo'),
297
('AcquisitionsLog','1',NULL,'If ON, log all notices sent','YesNo'),
298
('LibraryName','','','Define the library name as displayed on the OPAC',''),
298
('LibraryName','','','Define the library name as displayed on the OPAC',''),
299
('LibraryThingForLibrariesEnabled','0','','Enable or Disable Library Thing for Libraries Features','YesNo'),
299
('LibraryThingForLibrariesEnabled','0','','Enable or Disable Library Thing for Libraries Features','YesNo'),
300
('LibraryThingForLibrariesID','','','See:http://librarything.com/forlibraries/','free'),
300
('LibraryThingForLibrariesID','','','See:http://librarything.com/forlibraries/','free'),
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/logs.pref (-2 / +2 lines)
Lines 1-11 Link Here
1
Logging:
1
Logging:
2
    Logging:
2
    Logging:
3
        -
3
        -
4
            - pref: ClaimsLog
4
            - pref: AcquisitionsLog
5
              choices:
5
              choices:
6
                  1: Log
6
                  1: Log
7
                  0: "Don't log"
7
                  0: "Don't log"
8
            - when an automatic claim notice is sent.
8
            - when an automatic acquisitions claim notice is sent.
9
        -
9
        -
10
            - pref: BorrowersLog
10
            - pref: BorrowersLog
11
              choices:
11
              choices:
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/viewlog.tt (-2 / +2 lines)
Lines 84-90 Link Here
84
84
85
[%        CASE 'CIRCULATION'  %]Circulation[% UNLESS Koha.Preference('IssueLog') %] <i class="fa fa-warning" title="Log not enabled"></i>[% END %]
85
[%        CASE 'CIRCULATION'  %]Circulation[% UNLESS Koha.Preference('IssueLog') %] <i class="fa fa-warning" title="Log not enabled"></i>[% END %]
86
86
87
[%        CASE 'CLAIMS'       %]Claims[% UNLESS Koha.Preference('ClaimsLog') %] <i class="fa fa-warning" title="Log not enabled"></i>[% END %]
87
[%        CASE 'ACQUISITIONS'       %]Acquisitions[% UNLESS Koha.Preference('AcquisitionsLog') %] <i class="fa fa-warning" title="Log not enabled"></i>[% END %]
88
88
89
[%        CASE 'FINES'        %]Fines[% UNLESS Koha.Preference('FinesLog') %] <i class="fa fa-warning" title="Log not enabled"></i>[% END %]
89
[%        CASE 'FINES'        %]Fines[% UNLESS Koha.Preference('FinesLog') %] <i class="fa fa-warning" title="Log not enabled"></i>[% END %]
90
90
Lines 174-180 Link Here
174
                                        [% ELSE %]
174
                                        [% ELSE %]
175
                                            <label for="moduleALL" class="viewlog"><input type="checkbox" id="moduleALL" name="modules" value=""> All</label>
175
                                            <label for="moduleALL" class="viewlog"><input type="checkbox" id="moduleALL" name="modules" value=""> All</label>
176
                                        [% END %]
176
                                        [% END %]
177
                                        [% FOREACH modx IN [ 'AUTH' 'CATALOGUING' 'AUTHORITIES' 'MEMBERS' 'ACQUISITIONS' 'SERIAL' 'HOLDS' 'ILL' 'CIRCULATION' 'CLAIMS' 'FINES' 'SYSTEMPREFERENCE' 'CRONJOBS', 'REPORTS', 'SEARCHENGINE', 'NOTICES' ] %]
177
                                        [% FOREACH modx IN [ 'AUTH' 'CATALOGUING' 'AUTHORITIES' 'MEMBERS' 'ACQUISITIONS' 'SERIAL' 'HOLDS' 'ILL' 'CIRCULATION' 'ACQUISITIONS' 'FINES' 'SYSTEMPREFERENCE' 'CRONJOBS', 'REPORTS', 'SEARCHENGINE', 'NOTICES' ] %]
178
                                            [% IF modules.grep(modx).size %]
178
                                            [% IF modules.grep(modx).size %]
179
                                                <label for="module[% modx | html %]" class="viewlog"><input type="checkbox" id="module[% modx | html %]" name="modules" value="[% modx | html %]" checked="checked"> [% PROCESS translate_log_module module=modx %]</label>
179
                                                <label for="module[% modx | html %]" class="viewlog"><input type="checkbox" id="module[% modx | html %]" name="modules" value="[% modx | html %]" checked="checked"> [% PROCESS translate_log_module module=modx %]</label>
180
                                            [% ELSE %]
180
                                            [% ELSE %]
(-)a/t/db_dependent/Letters.t (-4 / +4 lines)
Lines 453-460 is($err->{'error'}, 'no_email', "Trying to send an alert when there's no e-mail Link Here
453
$bookseller = Koha::Acquisition::Booksellers->find( $booksellerid );
453
$bookseller = Koha::Acquisition::Booksellers->find( $booksellerid );
454
$bookseller->contacts->next->email('testemail@mydomain.com')->store;
454
$bookseller->contacts->next->email('testemail@mydomain.com')->store;
455
455
456
# Ensure that the preference 'ClaimsLog' is set to logging
456
# Ensure that the preference 'AcquisitionsLog' is set to logging
457
t::lib::Mocks::mock_preference( 'ClaimsLog', 'on' );
457
t::lib::Mocks::mock_preference( 'AcquisitionsLog', 'on' );
458
458
459
# SendAlerts needs branchemail or KohaAdminEmailAddress as sender
459
# SendAlerts needs branchemail or KohaAdminEmailAddress as sender
460
t::lib::Mocks::mock_preference( 'KohaAdminEmailAddress', 'library@domain.com' );
460
t::lib::Mocks::mock_preference( 'KohaAdminEmailAddress', 'library@domain.com' );
Lines 632-639 subtest 'SendAlerts - claimissue' => sub { Link Here
632
    $bookseller = Koha::Acquisition::Booksellers->find( $booksellerid );
632
    $bookseller = Koha::Acquisition::Booksellers->find( $booksellerid );
633
    $bookseller->contacts->next->email('testemail@mydomain.com')->store;
633
    $bookseller->contacts->next->email('testemail@mydomain.com')->store;
634
634
635
    # Ensure that the preference 'ClaimsLog' is set to logging
635
    # Ensure that the preference 'AcquisitionsLog' is set to logging
636
    t::lib::Mocks::mock_preference( 'ClaimsLog', 'on' );
636
    t::lib::Mocks::mock_preference( 'AcquisitionsLog', 'on' );
637
637
638
    # SendAlerts needs branchemail or KohaAdminEmailAddress as sender
638
    # SendAlerts needs branchemail or KohaAdminEmailAddress as sender
639
    t::lib::Mocks::mock_userenv({ branchcode => $library->{branchcode} });
639
    t::lib::Mocks::mock_userenv({ branchcode => $library->{branchcode} });
(-)a/t/db_dependent/UsageStats.t (-2 / +1 lines)
Lines 483-489 sub mocking_systempreferences_to_a_set_value { Link Here
483
        CataloguingLog
483
        CataloguingLog
484
        FinesLog
484
        FinesLog
485
        IssueLog
485
        IssueLog
486
        ClaimsLog
486
        AcquisitionsLog
487
        ReturnLog
487
        ReturnLog
488
        SubscriptionLog
488
        SubscriptionLog
489
        BiblioDefaultView
489
        BiblioDefaultView
490
- 

Return to bug 14233