View | Details | Raw Unified | Return to bug 28108
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
            "ACQUISITION",
537
            "CLAIMS",
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("LetterLog");
546
        ) if C4::Context->preference("ClaimsLog");
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
        LetterLog
225
        ClaimsLog
226
        ReturnLog
226
        ReturnLog
227
        SubscriptionLog
227
        SubscriptionLog
228
        BiblioDefaultView
228
        BiblioDefaultView
(-)a/installer/data/mysql/atomicupdate/claimslog.perl (+14 lines)
Line 0 Link Here
1
$DBversion = 'XXX';    # will be replaced by the RM
2
if ( CheckVersion($DBversion) ) {
3
    $dbh->do(q{
4
        UPDATE action_logs SET module = 'CLAIMS'
5
        WHERE module = 'ACQUISITIONS' AND ( action = 'SERIAL CLAIM' OR action = 'ACQUISITION ORDER' OR action = 'ACQUISITION CLAIM')
6
    });
7
8
    $dbh->do(q{
9
        UPDATE systempreferences SET variable = 'ClaimsLog' WHERE variable = 'LetterLog';
10
    });
11
12
    # Always end with this (adjust the bug info)
13
    NewVersion( $DBversion, XXXXX, "Description" );
14
}
(-)a/installer/data/mysql/mandatory/sysprefs.sql (-1 / +1 lines)
Lines 296-302 INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` Link Here
296
('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'),
296
('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'),
297
('LabelMARCView','standard','standard|economical','Define how a MARC record will display','Choice'),
297
('LabelMARCView','standard','standard|economical','Define how a MARC record will display','Choice'),
298
('language','en',NULL,'Set the default language in the staff interface.','Languages'),
298
('language','en',NULL,'Set the default language in the staff interface.','Languages'),
299
('LetterLog','1',NULL,'If ON, log all notices sent','YesNo'),
299
('ClaimsLog','1',NULL,'If ON, log all notices sent','YesNo'),
300
('LibraryName','','','Define the library name as displayed on the OPAC',''),
300
('LibraryName','','','Define the library name as displayed on the OPAC',''),
301
('LibraryThingForLibrariesEnabled','0','','Enable or Disable Library Thing for Libraries Features','YesNo'),
301
('LibraryThingForLibrariesEnabled','0','','Enable or Disable Library Thing for Libraries Features','YesNo'),
302
('LibraryThingForLibrariesID','','','See:http://librarything.com/forlibraries/','free'),
302
('LibraryThingForLibrariesID','','','See:http://librarything.com/forlibraries/','free'),
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/logs.pref (-1 / +1 lines)
Lines 1-7 Link Here
1
Logging:
1
Logging:
2
    Logging:
2
    Logging:
3
        -
3
        -
4
            - pref: LetterLog
4
            - pref: ClaimsLog
5
              choices:
5
              choices:
6
                  1: Log
6
                  1: Log
7
                  0: "Don't log"
7
                  0: "Don't log"
(-)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 'LETTER'       %]Letter[% UNLESS Koha.Preference('LetterLog') %] <i class="fa fa-warning" title="Log not enabled"></i>[% END %]
87
[%        CASE 'CLAIMS'       %]Claims[% UNLESS Koha.Preference('ClaimsLog') %] <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 191-197 Link Here
191
                                        [% ELSE %]
191
                                        [% ELSE %]
192
                                            <label for="moduleALL" class="viewlog"><input type="checkbox" id="moduleALL" name="modules" value=""> All</label>
192
                                            <label for="moduleALL" class="viewlog"><input type="checkbox" id="moduleALL" name="modules" value=""> All</label>
193
                                        [% END %]
193
                                        [% END %]
194
                                        [% FOREACH modx IN [ 'AUTH' 'CATALOGUING' 'AUTHORITIES' 'MEMBERS' 'ACQUISITIONS' 'SERIAL' 'HOLDS' 'ILL' 'CIRCULATION' 'LETTER' 'FINES' 'SYSTEMPREFERENCE' 'CRONJOBS', 'REPORTS', 'SEARCHENGINE', 'NOTICES' ] %]
194
                                        [% FOREACH modx IN [ 'AUTH' 'CATALOGUING' 'AUTHORITIES' 'MEMBERS' 'ACQUISITIONS' 'SERIAL' 'HOLDS' 'ILL' 'CIRCULATION' 'CLAIMS' 'FINES' 'SYSTEMPREFERENCE' 'CRONJOBS', 'REPORTS', 'SEARCHENGINE', 'NOTICES' ] %]
195
                                            [% IF modules.grep(modx).size %]
195
                                            [% IF modules.grep(modx).size %]
196
                                                <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>
196
                                                <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>
197
                                            [% ELSE %]
197
                                            [% ELSE %]
(-)a/t/db_dependent/Letters.t (-4 / +4 lines)
Lines 454-461 is($err->{'error'}, 'no_email', "Trying to send an alert when there's no e-mail Link Here
454
$bookseller = Koha::Acquisition::Booksellers->find( $booksellerid );
454
$bookseller = Koha::Acquisition::Booksellers->find( $booksellerid );
455
$bookseller->contacts->next->email('testemail@mydomain.com')->store;
455
$bookseller->contacts->next->email('testemail@mydomain.com')->store;
456
456
457
# Ensure that the preference 'LetterLog' is set to logging
457
# Ensure that the preference 'ClaimsLog' is set to logging
458
t::lib::Mocks::mock_preference( 'LetterLog', 'on' );
458
t::lib::Mocks::mock_preference( 'ClaimsLog', 'on' );
459
459
460
# SendAlerts needs branchemail or KohaAdminEmailAddress as sender
460
# SendAlerts needs branchemail or KohaAdminEmailAddress as sender
461
t::lib::Mocks::mock_preference( 'KohaAdminEmailAddress', 'library@domain.com' );
461
t::lib::Mocks::mock_preference( 'KohaAdminEmailAddress', 'library@domain.com' );
Lines 633-640 subtest 'SendAlerts - claimissue' => sub { Link Here
633
    $bookseller = Koha::Acquisition::Booksellers->find( $booksellerid );
633
    $bookseller = Koha::Acquisition::Booksellers->find( $booksellerid );
634
    $bookseller->contacts->next->email('testemail@mydomain.com')->store;
634
    $bookseller->contacts->next->email('testemail@mydomain.com')->store;
635
635
636
    # Ensure that the preference 'LetterLog' is set to logging
636
    # Ensure that the preference 'ClaimsLog' is set to logging
637
    t::lib::Mocks::mock_preference( 'LetterLog', 'on' );
637
    t::lib::Mocks::mock_preference( 'ClaimsLog', 'on' );
638
638
639
    # SendAlerts needs branchemail or KohaAdminEmailAddress as sender
639
    # SendAlerts needs branchemail or KohaAdminEmailAddress as sender
640
    t::lib::Mocks::mock_userenv({ branchcode => $library->{branchcode} });
640
    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
        LetterLog
486
        ClaimsLog
487
        ReturnLog
487
        ReturnLog
488
        SubscriptionLog
488
        SubscriptionLog
489
        BiblioDefaultView
489
        BiblioDefaultView
490
- 

Return to bug 28108