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

(-)a/C4/Letters.pm (-2 / +2 lines)
Lines 495-502 sub SendAlerts { Link Here
495
                ),
495
                ),
496
                from => (
496
                from => (
497
                    $type eq 'claimissues'
497
                    $type eq 'claimissues'
498
                    ? C4::Context->preference('SerialsDefaultEMailAddress')
498
                    ? C4::Context->preference('SerialsDefaultEmailAddress')
499
                    : C4::Context->preference('AcquisitionsDefaultEMailAddress')
499
                    : C4::Context->preference('AcquisitionsDefaultEmailAddress')
500
                    )
500
                    )
501
                    || $library->branchemail
501
                    || $library->branchemail
502
                    || C4::Context->preference('KohaAdminEmailAddress'),
502
                    || C4::Context->preference('KohaAdminEmailAddress'),
(-)a/installer/data/mysql/mandatory/sysprefs.sql (-2 / +2 lines)
Lines 7-13 INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` Link Here
7
('AcqItemSetSubfieldsWhenReceived','','','Upon receiving items, update their subfields if they were created when placing an order (e.g. o=5|a="foo bar")','Free'),
7
('AcqItemSetSubfieldsWhenReceived','','','Upon receiving items, update their subfields if they were created when placing an order (e.g. o=5|a="foo bar")','Free'),
8
('AcquisitionDetails', '1', '', 'Hide/Show acquisition details on the biblio detail page.', 'YesNo'),
8
('AcquisitionDetails', '1', '', 'Hide/Show acquisition details on the biblio detail page.', 'YesNo'),
9
('AcquisitionLog','0',NULL,'If ON, log acquisitions activity','YesNo'),
9
('AcquisitionLog','0',NULL,'If ON, log acquisitions activity','YesNo'),
10
('AcquisitionsDefaultEMailAddress', '', NULL, 'Default email address  that acquisition notices are sent from', 'Free'),
10
('AcquisitionsDefaultEmailAddress', '', NULL, 'Default email address  that acquisition notices are sent from', 'Free'),
11
('AcquisitionsDefaultReplyTo', '', NULL, "Default email address used as reply-to for notices sent by the acquisitions module.", 'Free'),
11
('AcquisitionsDefaultReplyTo', '', NULL, "Default email address used as reply-to for notices sent by the acquisitions module.", 'Free'),
12
('AcqViewBaskets','user','user|branch|all','Define which baskets a user is allowed to view: their own only, any within their branch, or all','Choice'),
12
('AcqViewBaskets','user','user|branch|all','Define which baskets a user is allowed to view: their own only, any within their branch, or all','Choice'),
13
('AcqWarnOnDuplicateInvoice','0','','Warn librarians when they try to create a duplicate invoice','YesNo'),
13
('AcqWarnOnDuplicateInvoice','0','','Warn librarians when they try to create a duplicate invoice','YesNo'),
Lines 692-698 INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` Link Here
692
('SendAllEmailsTo','',NULL,'All emails will be redirected to this email if it is not empty','free'),
692
('SendAllEmailsTo','',NULL,'All emails will be redirected to this email if it is not empty','free'),
693
('SeparateHoldings','0',NULL,'Separate current branch holdings from other holdings','YesNo'),
693
('SeparateHoldings','0',NULL,'Separate current branch holdings from other holdings','YesNo'),
694
('SeparateHoldingsBranch','homebranch','homebranch|holdingbranch','Branch used to separate holdings','Choice'),
694
('SeparateHoldingsBranch','homebranch','homebranch|holdingbranch','Branch used to separate holdings','Choice'),
695
('SerialsDefaultEMailAddress', '', NULL, 'Default email address used as reply-to for notices sent by the serials module.', 'Free'),
695
('SerialsDefaultEmailAddress', '', NULL, 'Default email address used as reply-to for notices sent by the serials module.', 'Free'),
696
('SerialsDefaultReplyTo', '', NULL, 'Default email address that serials notices are sent from.', 'Free'),
696
('SerialsDefaultReplyTo', '', NULL, 'Default email address that serials notices are sent from.', 'Free'),
697
('SerialsSearchResultsLimit', NULL, NULL, 'Serials search results limit', 'integer'),
697
('SerialsSearchResultsLimit', NULL, NULL, 'Serials search results limit', 'integer'),
698
('SessionRestrictionByIP','1','Check for change in remote IP address for session security. Disable only when remote IP address changes frequently.','','YesNo'),
698
('SessionRestrictionByIP','1','Check for change in remote IP address for session security. Disable only when remote IP address changes frequently.','','YesNo'),
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/acquisitions.pref (-1 / +1 lines)
Lines 128-134 Acquisitions: Link Here
128
              class: email
128
              class: email
129
        -
129
        -
130
            - Use the from email address
130
            - Use the from email address
131
            - pref: AcquisitionsDefaultEMailAddress
131
            - pref: AcquisitionsDefaultEmailAddress
132
              class: email
132
              class: email
133
            - 'when sending acquisitions order and claim notices.'
133
            - 'when sending acquisitions order and claim notices.'
134
            - '<br>If left empty, it will fall back to the first defined address in the following list: library email, <a href="/cgi-bin/koha/admin/preferences.pl?op=search&searchfield=KohaAdminEmailAddress">KohaAdminEmailAddress</a>.'
134
            - '<br>If left empty, it will fall back to the first defined address in the following list: library email, <a href="/cgi-bin/koha/admin/preferences.pl?op=search&searchfield=KohaAdminEmailAddress">KohaAdminEmailAddress</a>.'
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/serials.pref (-1 / +1 lines)
Lines 72-78 Serials: Link Here
72
    Notifications:
72
    Notifications:
73
    -
73
    -
74
        - Use the from email address
74
        - Use the from email address
75
        - pref: SerialsDefaultEMailAddress
75
        - pref: SerialsDefaultEmailAddress
76
          class: email
76
          class: email
77
        - 'when sending serial claim notices.'
77
        - 'when sending serial claim notices.'
78
        - '<br>If left empty, it will fall back to the first defined address in the following list: library email, <a href="/cgi-bin/koha/admin/preferences.pl?op=search&searchfield=KohaAdminEmailAddress">KohaAdminEmailAddress</a>.'
78
        - '<br>If left empty, it will fall back to the first defined address in the following list: library email, <a href="/cgi-bin/koha/admin/preferences.pl?op=search&searchfield=KohaAdminEmailAddress">KohaAdminEmailAddress</a>.'
(-)a/t/db_dependent/Letters.t (-5 / +4 lines)
Lines 537-543 t::lib::Mocks::mock_preference( 'KohaAdminEmailAddress', 'library@domain.com' ); Link Here
537
    );
537
    );
538
538
539
    # SendAlerts should use specific email addresses if set
539
    # SendAlerts should use specific email addresses if set
540
    t::lib::Mocks::mock_preference( 'AcquisitionsDefaultEMailAddress', 'acq-default@domain.com' );
540
    t::lib::Mocks::mock_preference( 'AcquisitionsDefaultEmailAddress', 'acq-default@domain.com' );
541
    t::lib::Mocks::mock_preference( 'AcquisitionsDefaultReplyTo',      'acq-replyto@domain.com' );
541
    t::lib::Mocks::mock_preference( 'AcquisitionsDefaultReplyTo',      'acq-replyto@domain.com' );
542
542
543
    warning_like {
543
    warning_like {
Lines 547-553 t::lib::Mocks::mock_preference( 'KohaAdminEmailAddress', 'library@domain.com' ); Link Here
547
        "SendAlerts is using the mocked send_or_die routine (orderacquisition)";
547
        "SendAlerts is using the mocked send_or_die routine (orderacquisition)";
548
    is(
548
    is(
549
        $email_object->email->header('From'), 'acq-default@domain.com',
549
        $email_object->email->header('From'), 'acq-default@domain.com',
550
        "AcquisitionsDefaultEMailAddress is used to sent acq notification"
550
        "AcquisitionsDefaultEmailAddress is used to sent acq notification"
551
    );
551
    );
552
    is(
552
    is(
553
        $email_object->email->header('Reply-To'), 'acq-replyto@domain.com',
553
        $email_object->email->header('Reply-To'), 'acq-replyto@domain.com',
Lines 773-779 subtest 'SendAlerts - claimissue' => sub { Link Here
773
    );
773
    );
774
    }
774
    }
775
775
776
    t::lib::Mocks::mock_preference( 'SerialsDefaultEMailAddress', 'ser-default@domain.com' );
776
    t::lib::Mocks::mock_preference( 'SerialsDefaultEmailAddress', 'ser-default@domain.com' );
777
    t::lib::Mocks::mock_preference( 'SerialsDefaultReplyTo', 'ser-replyto@domain.com' );
777
    t::lib::Mocks::mock_preference( 'SerialsDefaultReplyTo', 'ser-replyto@domain.com' );
778
778
779
    {
779
    {
Lines 782-788 subtest 'SendAlerts - claimissue' => sub { Link Here
782
        qr|Fake send_or_die|,
782
        qr|Fake send_or_die|,
783
        "SendAlerts is using the mocked send_or_die routine (claimissues)";
783
        "SendAlerts is using the mocked send_or_die routine (claimissues)";
784
    is( $email_object->email->header('From'),
784
    is( $email_object->email->header('From'),
785
        'ser-default@domain.com', "SerialsDefaultEMailAddress is used to serial claim issue" );
785
        'ser-default@domain.com', "SerialsDefaultEmailAddress is used to serial claim issue" );
786
    is( $email_object->email->header('Reply-To'),
786
    is( $email_object->email->header('Reply-To'),
787
        'ser-replyto@domain.com', "SerialsDefaultReplyTo is used to sent serial claim issue" );
787
        'ser-replyto@domain.com', "SerialsDefaultReplyTo is used to sent serial claim issue" );
788
788
789
- 

Return to bug 36409