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

(-)a/Koha/Ticket.pm (+26 lines)
Lines 135-140 sub store { Link Here
135
            C4::Letters::SendQueuedMessages(
135
            C4::Letters::SendQueuedMessages(
136
                { message_id => $acknowledgement_message_id } );
136
                { message_id => $acknowledgement_message_id } );
137
        }
137
        }
138
139
        # Notify cataloger by email
140
        if ( $self->biblio_id && C4::Context->preference('CatalogerEmails') ) {
141
142
            # notify the library if a notice exists
143
            my $notify_letter = C4::Letters::GetPreparedLetter(
144
                module      => 'catalog',
145
                letter_code => 'TICKET_NOTIFY',
146
                branchcode  => $self->reporter->branchcode,
147
                tables      => { tickets => $self->id }
148
            );
149
150
            if ($notify_letter) {
151
                my $message_id = C4::Letters::EnqueueLetter(
152
                    {
153
                        letter                 => $notify_letter,
154
                        message_transport_type => 'email',
155
                        to_address             =>
156
                          C4::Context->preference('CatalogerEmails'),
157
                        reply_address => $self->reporter->notice_email_address,
158
                    }
159
                );
160
                C4::Letters::SendQueuedMessages(
161
                    { message_id => $message_id } );
162
            }
163
        }
138
    }
164
    }
139
165
140
    return $self;
166
    return $self;
(-)a/installer/data/mysql/atomicupdate/bug_31028.pl (+16 lines)
Lines 109-113 return { Link Here
109
            }
109
            }
110
        );
110
        );
111
        say $out "Added new notice 'TICKET_RESOLVE'";
111
        say $out "Added new notice 'TICKET_RESOLVE'";
112
113
        $dbh->do(
114
            q{
115
                INSERT IGNORE INTO systempreferences ( `variable`, `value`, `options`, `explanation`, `type` ) VALUES
116
	            ('CatalogerEmails', '', '', 'Notify these catalogers by email when a catalog concern is submitted', 'free')
117
	        }
118
        );
119
        say $out "`CatalogerEmails` preference added";
120
121
        $dbh->do(
122
            q{
123
                INSERT IGNORE INTO letter(module,code,branchcode,name,is_html,title,content,message_transport_type)
124
                VALUES ( 'catalog', 'TICKET_NOTIFY', '', 'Catalog concern notification', '1', 'Catalog concern reported', "Dear cataloger,\r\n\r\n[% INCLUDE 'patron-title.inc' patron => ticket.reporter %] reported the following concern with [% INCLUDE 'biblio-title.inc' biblio=ticket.biblio link = 1 %]\r\n\r\n\r\n\r\n[% ticket.body %]\r\n\r\n\r\n\r\nYou can mark this concern as resolved from the concern management <a href='[% Koha.Preference('IntranetBaseURL') %]/cgi-bin/koha/cataloguing/concerns.pl'>page</a>.", 'email' );
125
            }
126
        );
127
        say $out "Added new notice 'TICKET_NOTIFY'";
112
    }
128
    }
113
}
129
}
(-)a/installer/data/mysql/en/mandatory/sample_notices.yml (+16 lines)
Lines 97-102 tables: Link Here
97
            - ""
97
            - ""
98
            - "Thankyou"
98
            - "Thankyou"
99
99
100
        - module: catalog
101
          code: TICKET_NOTIFY
102
          branchcode: ""
103
          name: "Concern notification"
104
          is_html: 1
105
          title: "Catalog concern reported"
106
          message_transport_type: email
107
          lang: default
108
          content:
109
            - "Dear cataloger,"
110
            - "[% INCLUDE 'patron-title.inc' patron => ticket.reporter %] reported the following concern with [% INCLUDE 'biblio-title.inc' biblio=ticket.biblio link = 1 %]"
111
            - ""
112
            - "[% ticket.body %]"
113
            - ""
114
            - "You can mark this concern as resolved from the concern management <a href='[% Koha.Preference('IntranetBaseURL') %]/cgi-bin/koha/cataloguing/concerns.pl'>page</a>."
115
100
        - module: circulation
116
        - module: circulation
101
          code: ACCOUNT_CREDIT
117
          code: ACCOUNT_CREDIT
102
          branchcode: ""
118
          branchcode: ""
(-)a/installer/data/mysql/mandatory/sysprefs.sql (+1 lines)
Lines 131-136 INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` Link Here
131
('casLogout','0','','Does a logout from Koha should also log the user out of CAS?','YesNo'),
131
('casLogout','0','','Does a logout from Koha should also log the user out of CAS?','YesNo'),
132
('casServerUrl','https://localhost:8443/cas','','URL of the cas server','Free'),
132
('casServerUrl','https://localhost:8443/cas','','URL of the cas server','Free'),
133
('casServerVersion','2', '2|3','Version of the CAS server Koha will connect to.','Choice'),
133
('casServerVersion','2', '2|3','Version of the CAS server Koha will connect to.','Choice'),
134
('CatalogerEmails', '', '', 'Notify these catalogers by email when a catalog concern is submitted', 'free'),
134
('CatalogModuleRelink','0',NULL,'If OFF the linker will never replace the authids that are set in the cataloging module.','YesNo'),
135
('CatalogModuleRelink','0',NULL,'If OFF the linker will never replace the authids that are set in the cataloging module.','YesNo'),
135
('CataloguingLog','1',NULL,'If ON, log edit/create/delete actions on bibliographic data. WARNING: this feature is very resource consuming.','YesNo'),
136
('CataloguingLog','1',NULL,'If ON, log edit/create/delete actions on bibliographic data. WARNING: this feature is very resource consuming.','YesNo'),
136
('ChargeFinesOnClosedDays','0',NULL,'Charge fines on days the library is closed.','YesNo'),
137
('ChargeFinesOnClosedDays','0',NULL,'Charge fines on days the library is closed.','YesNo'),
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/cataloguing.pref (-1 / +6 lines)
Lines 42-47 Cataloging: Link Here
42
                  1: "Allow"
42
                  1: "Allow"
43
                  0: "Don't allow"
43
                  0: "Don't allow"
44
            - authorized values to be created within the cataloguing module. Librarian will need the manage_auth_values subpermission.
44
            - authorized values to be created within the cataloguing module. Librarian will need the manage_auth_values subpermission.
45
        -
46
            - "Use "
47
            - pref: CatalogerEmails
48
              default: ''
49
              class: email
50
            - " as the notification address for catalog concerns."
45
51
46
    Spine labels:
52
    Spine labels:
47
        -
53
        -
48
- 

Return to bug 31028