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

(-)a/Koha/Illrequest.pm (-1 / +1 lines)
Lines 1064-1070 EOF Link Here
1064
        my @address = map { $branch->$_ }
1064
        my @address = map { $branch->$_ }
1065
            qw/ branchname branchaddress1 branchaddress2 branchaddress3
1065
            qw/ branchname branchaddress1 branchaddress2 branchaddress3
1066
                branchzip branchcity branchstate branchcountry branchphone
1066
                branchzip branchcity branchstate branchcountry branchphone
1067
                branchemail /;
1067
                branchillemail branchemail /;
1068
        my $address = "";
1068
        my $address = "";
1069
        foreach my $line ( @address ) {
1069
        foreach my $line ( @address ) {
1070
            $address .= $line . "\n" if $line;
1070
            $address .= $line . "\n" if $line;
(-)a/Koha/REST/V1/Library.pm (+2 lines)
Lines 276-281 our $to_api_mapping = { Link Here
276
    branchphone      => 'phone',
276
    branchphone      => 'phone',
277
    branchfax        => 'fax',
277
    branchfax        => 'fax',
278
    branchemail      => 'email',
278
    branchemail      => 'email',
279
    branchillemail   => 'illemail',
279
    branchreplyto    => 'reply_to_email',
280
    branchreplyto    => 'reply_to_email',
280
    branchreturnpath => 'return_path_email',
281
    branchreturnpath => 'return_path_email',
281
    branchurl        => 'url',
282
    branchurl        => 'url',
Lines 303-308 our $to_model_mapping = { Link Here
303
    phone             => 'branchphone',
304
    phone             => 'branchphone',
304
    fax               => 'branchfax',
305
    fax               => 'branchfax',
305
    email             => 'branchemail',
306
    email             => 'branchemail',
307
    illemail          => 'branchillemail',
306
    reply_to_email    => 'branchreplyto',
308
    reply_to_email    => 'branchreplyto',
307
    return_path_email => 'branchreturnpath',
309
    return_path_email => 'branchreturnpath',
308
    url               => 'branchurl',
310
    url               => 'branchurl',
(-)a/admin/branches.pl (+1 lines)
Lines 66-71 if ( $op eq 'add_form' ) { Link Here
66
      branchphone
66
      branchphone
67
      branchfax
67
      branchfax
68
      branchemail
68
      branchemail
69
      branchillemail
69
      branchreplyto
70
      branchreplyto
70
      branchreturnpath
71
      branchreturnpath
71
      branchurl
72
      branchurl
(-)a/installer/data/mysql/atomicupdate/bug_22818_add_ill_notices.perl (+38 lines)
Line 0 Link Here
1
$DBversion = 'XXX';
2
if( CheckVersion( $DBversion ) ) {
3
    if( !column_exists( 'branches', 'branchillemail' ) ) {
4
        $dbh->do( q| ALTER TABLE branches ADD branchillemail LONGTEXT AFTER branchemail | );
5
    }
6
    # Add new sysprefs
7
    $dbh->do( q| INSERT IGNORE INTO systempreferences (variable, value, explanation, options, type) VALUES ('ILLDefaultStaffEmail', '', 'Fallback email address for staff ILL notices to be sent to in the absence of a branch address', NULL, 'Free'); | );
8
    $dbh->do( q| INSERT IGNORE INTO systempreferences (variable, value, explanation, options, type) VALUES ('ILLSendStaffNotices', NULL, 'Send these ILL notices to staff', NULL, 'multiple'); | );
9
    # Add new notices
10
    $dbh->do( q| INSERT IGNORE INTO letter(module, code, branchcode, name, is_html, title, content, message_transport_type, lang) VALUES ('ill', 'ILL_PICKUP_READY', '', 'ILL request ready for pickup', 0, "Interlibrary loan request ready for pickup", "Dear <<borrowers.firstname>> <<borrowers.surname>>,\n\nThe Interlibrary loans request number <<illrequests.illrequest_id>> you placed for:\n\n- <<ill_bib_title>> - <<ill_bib_author>>\n\nis ready for pick up from <<branches.branchname>>.\n\nKind Regards\n\n<<branches.branchname>>\n<<branches.branchaddress1>>\n<<branches.branchaddress2>>\n<<branches.branchaddress3>>\n<<branches.branchcity>>\n<<branches.branchstate>>\n<<branches.branchzip>>\n<<branches.branchphone>>\n<<branches.branchillemail>>\n<<branches.branchemail>>", 'email', 'default'); | );
11
    $dbh->do( q| INSERT IGNORE INTO letter(module, code, branchcode, name, is_html, title, content, message_transport_type, lang) VALUES ('ill', 'ILL_REQUEST_UNAVAIL', '', 'ILL request unavailable', 0, "Interlibrary loan request unavailable", "Dear <<borrowers.firstname>> <<borrowers.surname>>,\n\nThe Interlibrary loans request number <<illrequests.illrequest_id>> you placed for\n\n- <<ill_bib_title>> - <<ill_bib_author>>\n\nis unfortunately unavailable.\n\nKind Regards\n\n<<branches.branchname>>\n<<branches.branchaddress1>>\n<<branches.branchaddress2>>\n<<branches.branchaddress3>>\n<<branches.branchcity>>\n<<branches.branchstate>>\n<<branches.branchzip>>\n<<branches.branchphone>>\n<<branches.branchillemail>>\n<<branches.branchemail>>", 'email', 'default'); | );
12
    $dbh->do( q| INSERT IGNORE INTO letter(module, code, branchcode, name, is_html, title, content, message_transport_type, lang) VALUES ('ill', 'ILL_REQUEST_CANCEL', '', 'ILL request cancelled', 0, "Interlibrary loan request cancelled", "The patron for interlibrary loans request <<illrequests.illrequest_id>>, with the following details, has requested cancellation of this ILL request:\n\n<<ill_full_metadata>>", 'email', 'default'); | );
13
    $dbh->do( q| INSERT IGNORE INTO letter(module, code, branchcode, name, is_html, title, content, message_transport_type, lang) VALUES ('ill', 'ILL_REQUEST_MODIFIED', '', 'ILL request modified', 0, "Interlibrary loan request modified", "The patron for interlibrary loans request <<illrequests.illrequest_id>>, with the following details, has modified this ILL request:\n\n<<ill_full_metadata>>", 'email', 'default'); | );
14
    $dbh->do( q| INSERT IGNORE INTO letter(module, code, branchcode, name, is_html, title, content, message_transport_type, lang) VALUES ('ill', 'ILL_PARTNER_REQ', '', 'ILL request to partners', 0, "Interlibrary loan request to partners", "Dear Sir/Madam,\n\nWe would like to request an interlibrary loan for a title matching the following description:\n\n<<ill_full_metadata>>\n\nPlease let us know if you are able to supply this to us.\n\nKind Regards\n\n<<branches.branchname>>\n<<branches.branchaddress1>>\n<<branches.branchaddress2>>\n<<branches.branchaddress3>>\n<<branches.branchcity>>\n<<branches.branchstate>>\n<<branches.branchzip>>\n<<branches.branchphone>>\n<<branches.branchillemail>>\n<<branches.branchemail>>", 'email', 'default'); | );
15
    $dbh->do( q| INSERT IGNORE INTO letter(module, code, branchcode, name, is_html, title, content, message_transport_type, lang) VALUES ('ill', 'ILL_PICKUP_READY', '', 'ILL request ready for pickup', 0, "Interlibrary loan request ready for pickup", "Dear <<borrowers.firstname>> <<borrowers.surname>>,\n\nThe Interlibrary loans request number <<illrequests.illrequest_id>> you placed for:\n\n- <<ill_bib_title>> - <<ill_bib_author>>\n\nis ready for pick up from <<branches.branchname>>.\n\nKind Regards\n\n<<branches.branchname>>\n<<branches.branchaddress1>>\n<<branches.branchaddress2>>\n<<branches.branchaddress3>>\n<<branches.branchcity>>\n<<branches.branchstate>>\n<<branches.branchzip>>\n<<branches.branchphone>>\n<<branches.branchillemail>>\n<<branches.branchemail>>", 'sms', 'default'); | );
16
    $dbh->do( q| INSERT IGNORE INTO letter(module, code, branchcode, name, is_html, title, content, message_transport_type, lang) VALUES ('ill', 'ILL_REQUEST_UNAVAIL', '', 'ILL request unavailable', 0, "Interlibrary loan request unavailable", "Dear <<borrowers.firstname>> <<borrowers.surname>>,\n\nThe Interlibrary loans request number <<illrequests.illrequest_id>> you placed for\n\n- <<ill_bib_title>> - <<ill_bib_author>>\n\nis unfortunately unavailable.\n\nKind Regards\n\n<<branches.branchname>>\n<<branches.branchaddress1>>\n<<branches.branchaddress2>>\n<<branches.branchaddress3>>\n<<branches.branchcity>>\n<<branches.branchstate>>\n<<branches.branchzip>>\n<<branches.branchphone>>\n<<branches.branchillemail>>\n<<branches.branchemail>>", 'sms', 'default'); | );
17
    $dbh->do( q| INSERT IGNORE INTO letter(module, code, branchcode, name, is_html, title, content, message_transport_type, lang) VALUES ('ill', 'ILL_REQUEST_CANCEL', '', 'ILL request cancelled', 0, "Interlibrary loan request cancelled", "The patron for interlibrary loans request <<illrequests.illrequest_id>>, with the following details, has requested cancellation of this ILL request:\n\n<<ill_full_metadata>>", 'sms', 'default'); | );
18
    $dbh->do( q| INSERT IGNORE INTO letter(module, code, branchcode, name, is_html, title, content, message_transport_type, lang) VALUES ('ill', 'ILL_REQUEST_MODIFIED', '', 'ILL request modified', 0, "Interlibrary loan request modified", "The patron for interlibrary loans request <<illrequests.illrequest_id>>, with the following details, has modified this ILL request:\n\n<<ill_full_metadata>>", 'sms', 'default'); | );
19
    $dbh->do( q| INSERT IGNORE INTO letter(module, code, branchcode, name, is_html, title, content, message_transport_type, lang) VALUES ('ill', 'ILL_PARTNER_REQ', '', 'ILL request to partners', 0, "Interlibrary loan request to partners", "Dear Sir/Madam,\n\nWe would like to request an interlibrary loan for a title matching the following description:\n\n<<ill_full_metadata>>\n\nPlease let us know if you are able to supply this to us.\n\nKind Regards\n\n<<branches.branchname>>\n<<branches.branchaddress1>>\n<<branches.branchaddress2>>\n<<branches.branchaddress3>>\n<<branches.branchcity>>\n<<branches.branchstate>>\n<<branches.branchzip>>\n<<branches.branchphone>>\n<<branches.branchillemail>>\n<<branches.branchemail>>", 'sms', 'default'); | );
20
    # Add patron messaging preferences
21
    $dbh->do( q| INSERT IGNORE INTO message_attributes (message_name, takes_days) VALUES ('Ill_ready', 0); | );
22
    my $ready_id = $dbh->{mysql_insertid};
23
    if (defined $ready_id) {
24
        $dbh->do( qq(INSERT IGNORE INTO message_transports (message_attribute_id, message_transport_type, is_digest, letter_module, letter_code) VALUES ($ready_id, 'email', 0, 'ill', 'ILL_PICKUP_READY');) );
25
        $dbh->do( qq(INSERT IGNORE INTO message_transports (message_attribute_id, message_transport_type, is_digest, letter_module, letter_code) VALUES ($ready_id, 'sms', 0, 'ill', 'ILL_PICKUP_READY');) );
26
        $dbh->do( qq(INSERT IGNORE INTO message_transports (message_attribute_id, message_transport_type, is_digest, letter_module, letter_code) VALUES ($ready_id, 'phone', 0, 'ill', 'ILL_PICKUP_READY');) );
27
    }
28
    $dbh->do( q| INSERT IGNORE INTO message_attributes (message_name, takes_days) VALUES ('Ill_unavailable', 0); | );
29
    my $unavail_id = $dbh->{mysql_insertid};
30
    if (defined $unavail_id) {
31
        $dbh->do( qq(INSERT IGNORE INTO message_transports (message_attribute_id, message_transport_type, is_digest, letter_module, letter_code) VALUES ($unavail_id, 'email', 0, 'ill', 'ILL_REQUEST_UNAVAIL');) );
32
        $dbh->do( qq(INSERT IGNORE INTO message_transports (message_attribute_id, message_transport_type, is_digest, letter_module, letter_code) VALUES ($unavail_id, 'sms', 0, 'ill', 'ILL_REQUEST_UNAVAIL');) );
33
        $dbh->do( qq(INSERT IGNORE INTO message_transports (message_attribute_id, message_transport_type, is_digest, letter_module, letter_code) VALUES ($unavail_id, 'phone', 0, 'ill', 'ILL_REQUEST_UNAVAIL');) );
34
    }
35
36
    SetVersion( $DBversion );
37
    print "Upgrade to $DBversion done (Bug 22818 - Add ILL notices)\n";
38
}
(-)a/installer/data/mysql/kohastructure.sql (+1 lines)
Lines 257-262 CREATE TABLE `branches` ( -- information about your libraries or branches are st Link Here
257
  `branchphone` LONGTEXT, -- the primary phone for your library or branch
257
  `branchphone` LONGTEXT, -- the primary phone for your library or branch
258
  `branchfax` LONGTEXT, -- the fax number for your library or branch
258
  `branchfax` LONGTEXT, -- the fax number for your library or branch
259
  `branchemail` LONGTEXT, -- the primary email address for your library or branch
259
  `branchemail` LONGTEXT, -- the primary email address for your library or branch
260
  `branchillemail` LONGTEXT, -- the ILL staff email address for your library or branch
260
  `branchreplyto` LONGTEXT, -- the email to be used as a Reply-To
261
  `branchreplyto` LONGTEXT, -- the email to be used as a Reply-To
261
  `branchreturnpath` LONGTEXT, -- the email to be used as Return-Path
262
  `branchreturnpath` LONGTEXT, -- the email to be used as Return-Path
262
  `branchurl` LONGTEXT, -- the URL for your library or branch's website
263
  `branchurl` LONGTEXT, -- the URL for your library or branch's website
(-)a/installer/data/mysql/sysprefs.sql (+2 lines)
Lines 225-230 INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` Link Here
225
('ILLModuleCopyrightClearance','','70|10','Enter text to enable the copyright clearance stage of request creation. Text will be displayed','Textarea'),
225
('ILLModuleCopyrightClearance','','70|10','Enter text to enable the copyright clearance stage of request creation. Text will be displayed','Textarea'),
226
('ILLModuleUnmediated','0','','If enabled, try to immediately progress newly placed ILL requests.','YesNo'),
226
('ILLModuleUnmediated','0','','If enabled, try to immediately progress newly placed ILL requests.','YesNo'),
227
('ILLOpacbackends',NULL,NULL,'ILL backends to enabled for OPAC initiated requests','multiple'),
227
('ILLOpacbackends',NULL,NULL,'ILL backends to enabled for OPAC initiated requests','multiple'),
228
('ILLDefaultStaffEmail', '', NULL, 'Fallback email address for staff ILL notices to be sent to in the absence of a branch address', 'Free'),
229
('ILLSendStaffNotices', NULL, NULL, 'Send these ILL notices to staff', 'multiple'),
228
('ILS-DI','0','','Enables ILS-DI services at OPAC.','YesNo'),
230
('ILS-DI','0','','Enables ILS-DI services at OPAC.','YesNo'),
229
('ILS-DI:AuthorizedIPs','','Restricts usage of ILS-DI to some IPs','.','Free'),
231
('ILS-DI:AuthorizedIPs','','Restricts usage of ILS-DI to some IPs','.','Free'),
230
('ImageLimit','5','','Limit images stored in the database by the Patron Card image manager to this number.','Integer'),
232
('ImageLimit','5','','Limit images stored in the database by the Patron Card image manager to this number.','Integer'),
(-)a/koha-tmpl/intranet-tmpl/prog/en/includes/messaging-preference-form.inc (+2 lines)
Lines 21-26 Link Here
21
          [% ELSIF ( messaging_preference.Hold_Filled ) %]Hold filled
21
          [% ELSIF ( messaging_preference.Hold_Filled ) %]Hold filled
22
          [% ELSIF ( messaging_preference.Item_Check_in ) %]Item check-in
22
          [% ELSIF ( messaging_preference.Item_Check_in ) %]Item check-in
23
          [% ELSIF ( messaging_preference.Item_Checkout ) %]Item checkout
23
          [% ELSIF ( messaging_preference.Item_Checkout ) %]Item checkout
24
          [% ELSIF ( messaging_preference.Ill_ready ) %]Interlibrary loan ready
25
          [% ELSIF ( messaging_preference.Ill_unavailable ) %]Interlibrary loan unavailable
24
          [% ELSE %]Unknown [% END %]</td>
26
          [% ELSE %]Unknown [% END %]</td>
25
      [% IF ( messaging_preference.takes_days ) %]
27
      [% IF ( messaging_preference.takes_days ) %]
26
      <td>
28
      <td>
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/branches.tt (+6 lines)
Lines 1-3 Link Here
1
[% USE Koha %]
1
[% USE raw %]
2
[% USE raw %]
2
[% USE Asset %]
3
[% USE Asset %]
3
[% SET footerjs = 1 %]
4
[% SET footerjs = 1 %]
Lines 139-144 Link Here
139
                <li><label for="branchphone">Phone: </label><input type="text" name="branchphone" id="branchphone" size="60" value="[% library.branchphone | html %]" /></li>
140
                <li><label for="branchphone">Phone: </label><input type="text" name="branchphone" id="branchphone" size="60" value="[% library.branchphone | html %]" /></li>
140
                <li><label for="branchfax">Fax: </label><input type="text" name="branchfax" id="branchfax" size="60" value="[% library.branchfax | html %]" /></li>
141
                <li><label for="branchfax">Fax: </label><input type="text" name="branchfax" id="branchfax" size="60" value="[% library.branchfax | html %]" /></li>
141
                <li><label for="branchemail">Email: </label><input type="text" name="branchemail" id="branchemail" class="email"  size="80" value="[% library.branchemail | html %]" /></li>
142
                <li><label for="branchemail">Email: </label><input type="text" name="branchemail" id="branchemail" class="email"  size="80" value="[% library.branchemail | html %]" /></li>
143
                [% IF (Koha.Preference('ILLModule')) %]
144
                <li><label for="branchillemail">ILL staff email: </label><input type="text" name="branchillemail" id="branchillemail" class="email"  size="80" value="[% library.branchillemail | html %]" /></li>
145
                [% END %]
142
                <li><label for="branchreplyto">Reply-To: </label> <input type="text" name="branchreplyto" id="branchreplyto" class="email"  size="80" value="[% library.branchreplyto | html %]" /><br /><span class="hint">Default: ReplyToDefault system preference</span></li>
146
                <li><label for="branchreplyto">Reply-To: </label> <input type="text" name="branchreplyto" id="branchreplyto" class="email"  size="80" value="[% library.branchreplyto | html %]" /><br /><span class="hint">Default: ReplyToDefault system preference</span></li>
143
                <li><label for="branchreturnpath">Return-Path: </label> <input type="text" name="branchreturnpath" id="branchreturnpath" class="email"  size="80" value="[% library.branchreturnpath | html %]" /><br /><span class="hint">Default: ReturnpathDefault system preference</span></li>
147
                <li><label for="branchreturnpath">Return-Path: </label> <input type="text" name="branchreturnpath" id="branchreturnpath" class="email"  size="80" value="[% library.branchreturnpath | html %]" /><br /><span class="hint">Default: ReturnpathDefault system preference</span></li>
144
                <li><label for="branchurl">URL: </label><input type="text" name="branchurl" id="branchurl"  size="80" value="[% library.branchurl | html %]" class="url" /></li>
148
                <li><label for="branchurl">URL: </label><input type="text" name="branchurl" id="branchurl"  size="80" value="[% library.branchurl | html %]" class="url" /></li>
Lines 221-226 Link Here
221
                                <br />Fax: [% library.branchfax | html %][% END %]
225
                                <br />Fax: [% library.branchfax | html %][% END %]
222
                            [% IF library.branchemail %]
226
                            [% IF library.branchemail %]
223
                                <br /><a href="mailto:[% library.branchemail | uri %]">[% library.branchemail | html %]</a>[% END %]
227
                                <br /><a href="mailto:[% library.branchemail | uri %]">[% library.branchemail | html %]</a>[% END %]
228
                            [% IF library.branchillemail && Koha.Preference('ILLModule') %]
229
                                <br /><a href="mailto:[% library.branchillemail | uri %]">[% library.branchillemail | html %]</a>[% END %]
224
                            [% IF library.branchurl %]
230
                            [% IF library.branchurl %]
225
                                <br /><a href="[% library.branchurl | url %]">[% library.branchurl | html %]</a>[% END %]
231
                                <br /><a href="[% library.branchurl | url %]">[% library.branchurl | html %]</a>[% END %]
226
                            [% IF library.opac_info %]
232
                            [% IF library.opac_info %]
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/categories.tt (+2 lines)
Lines 485-490 Link Here
485
                                                [% ELSIF ( prefs.Hold_Filled ) %]Hold filled
485
                                                [% ELSIF ( prefs.Hold_Filled ) %]Hold filled
486
                                                [% ELSIF ( prefs.Item_Check_in ) %]Item check-in
486
                                                [% ELSIF ( prefs.Item_Check_in ) %]Item check-in
487
                                                [% ELSIF ( prefs.Item_Checkout ) %]Item checkout
487
                                                [% ELSIF ( prefs.Item_Checkout ) %]Item checkout
488
                                                [% ELSIF ( prefs.Ill_ready ) %]Interlibrary loan ready
489
                                                [% ELSIF ( prefs.Ill_unavailable ) %]Interlibrary loan unavailable
488
                                                [% ELSE %]Unknown
490
                                                [% ELSE %]Unknown
489
                                                [% END %]:
491
                                                [% END %]:
490
                                                <strong>[% transport.transport | html %]</strong><br />
492
                                                <strong>[% transport.transport | html %]</strong><br />
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/circulation.pref (+8 lines)
Lines 827-832 Circulation: Link Here
827
                  yes: Enable
827
                  yes: Enable
828
                  no: Disable
828
                  no: Disable
829
            - unmediated Interlibrary loan requests. If enabled and the ILL backend supports it, the newly created requests are immediately requested by backend.
829
            - unmediated Interlibrary loan requests. If enabled and the ILL backend supports it, the newly created requests are immediately requested by backend.
830
        -
831
            - "Send these ILL notices to staff when appropriate"
832
            - pref: ILLSendStaffNotices
833
              class: multi
834
            - (separated with |). e.g. ILL_REQUEST_CANCEL|ILL_REQUEST_MODIFIED If left empty, no staff ILL notices will be sent
835
        -
836
            - Fallback email address for staff ILL notices to be sent to in the absence of a branch address
837
            - pref: ILLDefaultStaffEmail
830
    Fines Policy:
838
    Fines Policy:
831
        -
839
        -
832
            - Calculate fines based on days overdue
840
            - Calculate fines based on days overdue
(-)a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-messaging.tt (-1 / +2 lines)
Lines 52-57 Link Here
52
                                              [% ELSIF ( messaging_preference.Hold_Filled ) %]Hold filled
52
                                              [% ELSIF ( messaging_preference.Hold_Filled ) %]Hold filled
53
                                              [% ELSIF ( messaging_preference.Item_Check_in ) %]Item check-in
53
                                              [% ELSIF ( messaging_preference.Item_Check_in ) %]Item check-in
54
                                              [% ELSIF ( messaging_preference.Item_Checkout ) %]Item checkout
54
                                              [% ELSIF ( messaging_preference.Item_Checkout ) %]Item checkout
55
                                              [% ELSIF ( messaging_preference.Ill_ready ) %]Interlibrary loan ready
56
                                              [% ELSIF ( messaging_preference.Ill_unavailable ) %]Interlibrary loan unavailable
55
                                              [% ELSE %]Unknown [% END %]</td>
57
                                              [% ELSE %]Unknown [% END %]</td>
56
                                        [% IF ( messaging_preference.takes_days ) %]
58
                                        [% IF ( messaging_preference.takes_days ) %]
57
                                            <td><select class="input-mini" name="[% messaging_preference.message_attribute_id | html %]-DAYS">
59
                                            <td><select class="input-mini" name="[% messaging_preference.message_attribute_id | html %]-DAYS">
58
- 

Return to bug 22818