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

(-)a/C4/Letters.pm (-2 / +2 lines)
Lines 535-541 sub SendAlerts { Link Here
535
            unless $success;
535
            unless $success;
536
536
537
        logaction(
537
        logaction(
538
            "ACQUISITION",
538
            "CLAIMS",
539
            $action,
539
            $action,
540
            undef,
540
            undef,
541
            "To="
541
            "To="
Lines 544-550 sub SendAlerts { Link Here
544
                . $letter->{title}
544
                . $letter->{title}
545
                . " Content="
545
                . " Content="
546
                . $letter->{content}
546
                . $letter->{content}
547
        ) if C4::Context->preference("LetterLog");
547
        ) if C4::Context->preference("ClaimsLog");
548
    }
548
    }
549
   # send an "account details" notice to a newly created user
549
   # send an "account details" notice to a newly created user
550
    elsif ( $type eq 'members' ) {
550
    elsif ( $type eq 'members' ) {
(-)a/C4/UsageStats.pm (-1 / +1 lines)
Lines 223-229 sub BuildReport { Link Here
223
        CataloguingLog
223
        CataloguingLog
224
        FinesLog
224
        FinesLog
225
        IssueLog
225
        IssueLog
226
        LetterLog
226
        ClaimsLog
227
        ReturnLog
227
        ReturnLog
228
        SubscriptionLog
228
        SubscriptionLog
229
        BiblioDefaultView
229
        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 301-307 INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` Link Here
301
('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'),
301
('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'),
302
('LabelMARCView','standard','standard|economical','Define how a MARC record will display','Choice'),
302
('LabelMARCView','standard','standard|economical','Define how a MARC record will display','Choice'),
303
('language','en',NULL,'Set the default language in the staff interface.','Languages'),
303
('language','en',NULL,'Set the default language in the staff interface.','Languages'),
304
('LetterLog','1',NULL,'If ON, log all notices sent','YesNo'),
304
('ClaimsLog','1',NULL,'If ON, log all notices sent','YesNo'),
305
('LibraryName','','','Define the library name as displayed on the OPAC',''),
305
('LibraryName','','','Define the library name as displayed on the OPAC',''),
306
('LibraryThingForLibrariesEnabled','0','','Enable or Disable Library Thing for Libraries Features','YesNo'),
306
('LibraryThingForLibrariesEnabled','0','','Enable or Disable Library Thing for Libraries Features','YesNo'),
307
('LibraryThingForLibrariesID','','','See:http://librarything.com/forlibraries/','free'),
307
('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 82-88 Link Here
82
82
83
[%        CASE 'CIRCULATION'  %]Circulation[% UNLESS Koha.Preference('IssueLog') %] <i class="fa fa-warning" title="Log not enabled"></i>[% END %]
83
[%        CASE 'CIRCULATION'  %]Circulation[% UNLESS Koha.Preference('IssueLog') %] <i class="fa fa-warning" title="Log not enabled"></i>[% END %]
84
84
85
[%        CASE 'LETTER'       %]Letter[% UNLESS Koha.Preference('LetterLog') %] <i class="fa fa-warning" title="Log not enabled"></i>[% END %]
85
[%        CASE 'CLAIMS'       %]Claims[% UNLESS Koha.Preference('ClaimsLog') %] <i class="fa fa-warning" title="Log not enabled"></i>[% END %]
86
86
87
[%        CASE 'FINES'        %]Fines[% UNLESS Koha.Preference('FinesLog') %] <i class="fa fa-warning" title="Log not enabled"></i>[% END %]
87
[%        CASE 'FINES'        %]Fines[% UNLESS Koha.Preference('FinesLog') %] <i class="fa fa-warning" title="Log not enabled"></i>[% END %]
88
88
Lines 197-203 Link Here
197
                                        [% ELSE %]
197
                                        [% ELSE %]
198
                                            <label for="moduleALL" class="viewlog"><input type="checkbox" id="moduleALL" name="modules" value=""> All</label>
198
                                            <label for="moduleALL" class="viewlog"><input type="checkbox" id="moduleALL" name="modules" value=""> All</label>
199
                                        [% END %]
199
                                        [% END %]
200
                                        [% FOREACH modx IN [ 'AUTH' 'CATALOGUING' 'AUTHORITIES' 'MEMBERS' 'ACQUISITIONS' 'SERIAL' 'HOLDS' 'ILL' 'CIRCULATION' 'LETTER' 'FINES' 'SYSTEMPREFERENCE' 'CRONJOBS', 'REPORTS', 'SEARCHENGINE', 'NOTICES' ] %]
200
                                        [% FOREACH modx IN [ 'AUTH' 'CATALOGUING' 'AUTHORITIES' 'MEMBERS' 'ACQUISITIONS' 'SERIAL' 'HOLDS' 'ILL' 'CIRCULATION' 'CLAIMS' 'FINES' 'SYSTEMPREFERENCE' 'CRONJOBS', 'REPORTS', 'SEARCHENGINE', 'NOTICES' ] %]
201
                                            [% IF modules.grep(modx).size %]
201
                                            [% IF modules.grep(modx).size %]
202
                                                <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>
202
                                                <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>
203
                                            [% ELSE %]
203
                                            [% ELSE %]
(-)a/t/db_dependent/Letters.t (-4 / +4 lines)
Lines 460-467 is($err->{'error'}, 'no_email', "Trying to send an alert when there's no e-mail Link Here
460
$bookseller = Koha::Acquisition::Booksellers->find( $booksellerid );
460
$bookseller = Koha::Acquisition::Booksellers->find( $booksellerid );
461
$bookseller->contacts->next->email('testemail@mydomain.com')->store;
461
$bookseller->contacts->next->email('testemail@mydomain.com')->store;
462
462
463
# Ensure that the preference 'LetterLog' is set to logging
463
# Ensure that the preference 'ClaimsLog' is set to logging
464
t::lib::Mocks::mock_preference( 'LetterLog', 'on' );
464
t::lib::Mocks::mock_preference( 'ClaimsLog', 'on' );
465
465
466
# SendAlerts needs branchemail or KohaAdminEmailAddress as sender
466
# SendAlerts needs branchemail or KohaAdminEmailAddress as sender
467
t::lib::Mocks::mock_preference( 'KohaAdminEmailAddress', 'library@domain.com' );
467
t::lib::Mocks::mock_preference( 'KohaAdminEmailAddress', 'library@domain.com' );
Lines 639-646 subtest 'SendAlerts - claimissue' => sub { Link Here
639
    $bookseller = Koha::Acquisition::Booksellers->find( $booksellerid );
639
    $bookseller = Koha::Acquisition::Booksellers->find( $booksellerid );
640
    $bookseller->contacts->next->email('testemail@mydomain.com')->store;
640
    $bookseller->contacts->next->email('testemail@mydomain.com')->store;
641
641
642
    # Ensure that the preference 'LetterLog' is set to logging
642
    # Ensure that the preference 'ClaimsLog' is set to logging
643
    t::lib::Mocks::mock_preference( 'LetterLog', 'on' );
643
    t::lib::Mocks::mock_preference( 'ClaimsLog', 'on' );
644
644
645
    # SendAlerts needs branchemail or KohaAdminEmailAddress as sender
645
    # SendAlerts needs branchemail or KohaAdminEmailAddress as sender
646
    t::lib::Mocks::mock_userenv({ branchcode => $library->{branchcode} });
646
    t::lib::Mocks::mock_userenv({ branchcode => $library->{branchcode} });
(-)a/t/db_dependent/UsageStats.t (-2 / +1 lines)
Lines 484-490 sub mocking_systempreferences_to_a_set_value { Link Here
484
        CataloguingLog
484
        CataloguingLog
485
        FinesLog
485
        FinesLog
486
        IssueLog
486
        IssueLog
487
        LetterLog
487
        ClaimsLog
488
        ReturnLog
488
        ReturnLog
489
        SubscriptionLog
489
        SubscriptionLog
490
        BiblioDefaultView
490
        BiblioDefaultView
491
- 

Return to bug 28108