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

(-)a/C4/Letters.pm (-2 / +17 lines)
Lines 493-500 sub SendAlerts { Link Here
493
                    ? ( bcc => $userenv->{emailaddress} )
493
                    ? ( bcc => $userenv->{emailaddress} )
494
                    : ()
494
                    : ()
495
                ),
495
                ),
496
                from => $library->branchemail
496
                from => (
497
                  || C4::Context->preference('KohaAdminEmailAddress'),
497
                    $type eq 'claimissues'
498
                    ? C4::Context->preference('SerialsDefaultEMailAddress')
499
                    : C4::Context->preference('AcquisitionsDefaultEMailAddress')
500
                    )
501
                    || $library->branchemail
502
                    || C4::Context->preference('KohaAdminEmailAddress'),
503
                (
504
                    $type eq 'claimissues' && C4::Context->preference('SerialsDefaultReplyTo')
505
                    ? ( reply_to => C4::Context->preference('SerialsDefaultReplyTo') )
506
                    : (
507
                        ( $type eq 'claimacquisition' || $type eq 'orderacquisition' )
508
                            && C4::Context->preference('AcquisitionsDefaultReplyTo')
509
                        ? ( reply_to => C4::Context->preference('AcquisitionsDefaultReplyTo') )
510
                        : ()
511
                    )
512
                ),
498
                subject => "" . $letter->{title},
513
                subject => "" . $letter->{title},
499
            }
514
            }
500
        );
515
        );
(-)a/installer/data/mysql/atomicupdate/bug_20755-add_acquisitionsdefaultemailaddress_syspref.pl (+38 lines)
Line 0 Link Here
1
use Modern::Perl;
2
3
return {
4
    bug_number  => "20755",
5
    description => "Add sysprefs for email addresses in acquisitions and serials",
6
    up          => sub {
7
        my ($args) = @_;
8
        my ( $dbh, $out ) = @$args{qw(dbh out)};
9
10
        $dbh->do(
11
            q{
12
                INSERT IGNORE INTO systempreferences (variable, value, options, explanation, type) VALUES ('AcquisitionsDefaultEMailAddress', '', NULL, NULL, NULL);
13
            }
14
        );
15
        say $out "Added new system preference 'AcquisitionsDefaultEMailAddress'";
16
17
        $dbh->do(
18
            q{
19
                INSERT IGNORE INTO systempreferences (variable, value, options, explanation, type) VALUES ('AcquisitionsDefaultReplyTo', '', NULL, NULL, NULL);
20
            }
21
        );
22
        say $out "Added new system preference 'AcquisitionsDefaultReplyTo'";
23
24
        $dbh->do(
25
            q{
26
                INSERT IGNORE INTO systempreferences (variable, value, options, explanation, type) VALUES ('SerialsDefaultEMailAddress', '', NULL, NULL, NULL);
27
            }
28
        );
29
        say $out "Added new system preference 'SerialsDefaultEMailAddress'";
30
31
        $dbh->do(
32
            q{
33
                INSERT IGNORE INTO systempreferences (variable, value, options, explanation, type) VALUES ('SerialsDefaultReplyTo', '', NULL, NULL, NULL);
34
            }
35
        );
36
        say $out "Added new system preference 'SerialsDefaultReplyTo'";
37
    },
38
};
(-)a/installer/data/mysql/mandatory/sysprefs.sql (+4 lines)
Lines 7-12 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, NULL, NULL),
11
('AcquisitionsDefaultReplyTo', '', NULL, NULL, NULL),
10
('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'),
11
('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'),
12
('ActionLogsTraceDepth', '0', '', 'Sets the maximum depth of the action logs stack trace', 'Integer'),
14
('ActionLogsTraceDepth', '0', '', 'Sets the maximum depth of the action logs stack trace', 'Integer'),
Lines 667-672 INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` Link Here
667
('SendAllEmailsTo','',NULL,'All emails will be redirected to this email if it is not empty','free'),
669
('SendAllEmailsTo','',NULL,'All emails will be redirected to this email if it is not empty','free'),
668
('SeparateHoldings','0',NULL,'Separate current branch holdings from other holdings','YesNo'),
670
('SeparateHoldings','0',NULL,'Separate current branch holdings from other holdings','YesNo'),
669
('SeparateHoldingsBranch','homebranch','homebranch|holdingbranch','Branch used to separate holdings','Choice'),
671
('SeparateHoldingsBranch','homebranch','homebranch|holdingbranch','Branch used to separate holdings','Choice'),
672
('SerialsDefaultEMailAddress', '', NULL, NULL, NULL),
673
('SerialsDefaultReplyTo', '', NULL, NULL, NULL),
670
('SessionRestrictionByIP','1','Check for change in remote IP address for session security. Disable only when remote IP address changes frequently.','','YesNo'),
674
('SessionRestrictionByIP','1','Check for change in remote IP address for session security. Disable only when remote IP address changes frequently.','','YesNo'),
671
('SessionStorage','mysql','mysql|Pg|tmp','Use database or a temporary file for storing session data','Choice'),
675
('SessionStorage','mysql','mysql|Pg|tmp','Use database or a temporary file for storing session data','Choice'),
672
('ShelfBrowserUsesCcode','1','0','Use the item collection code when finding items for the shelf browser.','YesNo'),
676
('ShelfBrowserUsesCcode','1','0','Use the item collection code when finding items for the shelf browser.','YesNo'),
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/acquisitions.pref (-1 / +24 lines)
Lines 113-118 Acquisitions: Link Here
113
            - '<br>If you choose <a href="/cgi-bin/koha/admin/preferences.pl?op=search&searchfield=EmailAddressForSuggestions">EmailAddressForSuggestions</a> you have to enter a valid email address:'
113
            - '<br>If you choose <a href="/cgi-bin/koha/admin/preferences.pl?op=search&searchfield=EmailAddressForSuggestions">EmailAddressForSuggestions</a> you have to enter a valid email address:'
114
            - pref: EmailAddressForSuggestions
114
            - pref: EmailAddressForSuggestions
115
              class: email
115
              class: email
116
        -
117
            - Use the from email address
118
            - pref: AcquisitionsDefaultEMailAddress
119
              class: email
120
            - 'when sending acquisitions order and claim notices.'
121
            - '<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>.'
122
        -
123
            - Use the from email address
124
            - pref: SerialsDefaultEMailAddress
125
              class: email
126
            - 'when sending serial claim notices.'
127
            - '<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>.'
128
        -
129
            - Use the reply-to email address
130
            - pref: AcquisitionsDefaultReplyTo
131
              class: email
132
            - 'when sending acquisitions order and claim notices.'
133
            - '<br>If left empty, it will fall back to the first defined address in the following list: Library ReplyTo, Library Email, <a href="/cgi-bin/koha/admin/preferences.pl?op=search&searchfield=ReplytoDefault">ReplytoDefault</a>, <a href="/cgi-bin/koha/admin/preferences.pl?op=search&searchfield=KohaAdminEmailAddress">KohaAdminEmailAddress</a>.'
134
        -
135
            - Use the reply-to email address
136
            - pref: SerialsDefaultReplyTo
137
              class: email
138
            - 'when sending serial claim notices.'
139
            - '<br>If left empty, it will fall back to the first defined address in the following list: Library ReplyTo, Library Email, <a href="/cgi-bin/koha/admin/preferences.pl?op=search&searchfield=ReplytoDefault">ReplytoDefault</a>, <a href="/cgi-bin/koha/admin/preferences.pl?op=search&searchfield=KohaAdminEmailAddress">KohaAdminEmailAddress</a>.'
116
    Printing:
140
    Printing:
117
        -
141
        -
118
            - Use the
142
            - Use the
119
- 

Return to bug 20755