Line 0
Link Here
|
0 |
- |
1 |
=head1 NAME |
|
|
2 |
|
3 |
Koha notices |
4 |
|
5 |
=head1 DESCRIPTION |
6 |
|
7 |
Koha notices are stored in the 'letter' table, and contain templates |
8 |
used to populate the 'message_queue' table. Data from the letter |
9 |
table is read in via C4::Letters::GetPreparedLetter(), which is |
10 |
called throughout the Koha code base wherever notices are used. |
11 |
|
12 |
Notices are added to the message queue via C4::Letters::EnqueueLetter(). |
13 |
How the template from the letter template is parsed and populated |
14 |
varies widely from notice to notice; this is where all notices are |
15 |
documented. For each notice. |
16 |
|
17 |
* Module |
18 |
* Letter Code |
19 |
* Source file where the notice is populated |
20 |
* Logic that triggers the notice |
21 |
* Detail syntax (if any) |
22 |
* Available data (tables and substitutions). |
23 |
This should include information about the |
24 |
relationships between data elements |
25 |
* Message transport restrictions (if applicable) |
26 |
|
27 |
=head1 NOTICE MODULES |
28 |
|
29 |
=head2 Circulation |
30 |
|
31 |
=over |
32 |
|
33 |
=item DUE |
34 |
|
35 |
* Source file : advance_notices.pl |
36 |
* Trigger : Sent the day that a patron has items due. |
37 |
* Detail syntax : There is no detail -- one notice is sent per item due. |
38 |
* Available data : <<biblio.*>>, <<items.*>>, <<issues.*>>, <<branches.*>> |
39 |
|
40 |
=item PREDUE |
41 |
|
42 |
Uses the same fields and syntax ase DUE, except |
43 |
|
44 |
* Trigger : Sent X days before item is due, as specified by the patron's messaging |
45 |
preferences. |
46 |
|
47 |
=item DUEDGST |
48 |
|
49 |
* Source file : advance_notices.pl |
50 |
* Trigger : Sent the day that a patron has items due. |
51 |
* Detail syntax : <<items.content>> |
52 |
* Available data : <<count>> (number of items due), <<branches.*>> (patron's home branch) |
53 |
|
54 |
<<items.content>> is replaced in is entirety by the fields 'due date', 'title', 'author' ,'barcode', unless |
55 |
other fields are specified using the --itemscontent option to advance_notices.pl. |
56 |
Any column from biblios, items and issues tables may be used in --itemscontent. |
57 |
|
58 |
=item PREDUEDGST |
59 |
|
60 |
Uses the same fields and syntax ase DUEDGST, except |
61 |
|
62 |
* Trigger : Sent X days before items are due, as specified by the patron's |
63 |
messaging preferences. |
64 |
|
65 |
=item Overdue Notices (ODUE*) |
66 |
|
67 |
* Source file : overdue_notices.pl |
68 |
* Trigger : Notices sent X days after items are due, as specified in overdue triggers. |
69 |
* Detail syntax : <<items.content>> or <item> ... </item> |
70 |
* Available data : |
71 |
|
72 |
<<items.content>> Works identically to <<items.content>> in advance_notices.pl. |
73 |
|
74 |
<item> and </item> tags will expand fields from the following tables: |
75 |
|
76 |
items |
77 |
bibio |
78 |
biblioitems |
79 |
issues |
80 |
|
81 |
<item> items.barcode </item> will show the overdue item's barcode. |
82 |
|
83 |
Multiple fields may be expanded inside a single pair of tags. |
84 |
There is a special tag <<items.fine>> which is only available in within the |
85 |
<item> tag, which expands to the fine on the overdue item. |
86 |
|
87 |
The letter code for overdue notices may change, based on the values set in the Overdue notice triggers. |
88 |
|
89 |
=item OVERDUES_SLIP |
90 |
|
91 |
* Source file : members/print_overdues.pl |
92 |
* Detail syntax : Uses the same syntax as ODUE |
93 |
* Message transports : Print only. |
94 |
|
95 |
=item CHECKOUT |
96 |
|
97 |
* Source file : C4/Circulation.pm |
98 |
* Trigger : Data is added to the message in the message queue on every checkout |
99 |
(see below). |
100 |
* Detail syntax : See below. |
101 |
* Available data : <<items.*>> <<biblio.*>> <<biblioitems.*>> <<borrowers.*>> |
102 |
<<branches.*>> <<issues.*>> (for CHECKOUT and RENEWAL) |
103 |
|
104 |
Notices in C4/Circulation.pm use four dashes before and after the detail section: |
105 |
|
106 |
---- |
107 |
Detail here |
108 |
---- |
109 |
|
110 |
This is implemented in C4::Message. |
111 |
|
112 |
Data is added to message_queue.metadata; each checkout will print a line of detail between the dashes. |
113 |
Metadata accumulates until process_message_queue.pl runs. The first subsequent message generates a new |
114 |
record in message_queue. |
115 |
|
116 |
=item RENEWAL |
117 |
|
118 |
Uses the same syntax and data as CHECKOUT, except |
119 |
|
120 |
* Trigger : Data is added to the message in the message queue on every renewal. |
121 |
|
122 |
|
123 |
=item CHECKIN |
124 |
|
125 |
Uses the same syntax and data as CHECKOUT, except |
126 |
|
127 |
* Trigger : Data is added to the message in the message queue on every checkin. |
128 |
* Available data : <<old_issues.*>> (replaces <<issues.*>> as used in CHECKOUT and RENEWAL) |
129 |
|
130 |
=item TRANSFERSLIP |
131 |
|
132 |
* Source file : C4/Circulation.pm |
133 |
* Trigger : Prints when transfer is sent, except if hold captured. |
134 |
* Detail syntax : No repeating detail. |
135 |
* Available data : <<branches>>, <<biblio>>, <<items>> |
136 |
* Message transports : Set as 'email'. |
137 |
|
138 |
=item ISSUESLIP |
139 |
|
140 |
* Source file : C4/Members.pm |
141 |
* Trigger : Printed from circulation screen. |
142 |
* Detail syntax : <checkedout> </checkedout> |
143 |
<overdue> </overdue> |
144 |
<news> </news> |
145 |
* Message transports : Set as 'email'. |
146 |
|
147 |
<checkedout> and <overdue> will expand <<biblio.*>>, <<items.*>>, <<issues.*>> |
148 |
<news> will expand <<opac_news.*>>, as populated by C4::NewsChannels::GetNewsToDisplay() |
149 |
|
150 |
=item ISSUEQSLIP |
151 |
|
152 |
* Source file : C4/Members.pm |
153 |
* Trigger : Printed from circulation screen. |
154 |
* Detail syntax : <checkedout> </checkedout> |
155 |
<overdue> </overdue> |
156 |
* Message transports : Set as 'email'. |
157 |
|
158 |
<checkedout> will expand <<biblio.*>>, <<items.*>>, <<issues.*>> |
159 |
|
160 |
=item AR_SLIP |
161 |
|
162 |
* Source file : circ/article-request-slip.pl |
163 |
* Trigger : ? |
164 |
* Detail syntax : No repeating detail. |
165 |
* Available data : <<article_requests.*>>, <<borrowers.*>>, <<biblio.*>>, <<biblioitems.*>>, |
166 |
<<items.*>>, <<branches.*>> |
167 |
|
168 |
=item AR_Processing |
169 |
|
170 |
* Source file : Koha/ArticleRequest.pm |
171 |
* Trigger : ? |
172 |
* Detail syntax : No repeating detail. |
173 |
* Available data : <<article_requests.*>>, <<borrowers.*>>, <<biblio.*>>, <<biblioitems.*>>, |
174 |
<<items.*>>, <<branches.*>> |
175 |
=item AR_Completed |
176 |
|
177 |
Same as AR_Processing |
178 |
|
179 |
=item AR_Canceled |
180 |
|
181 |
Same as AR_Processing |
182 |
|
183 |
=item AR_Pending |
184 |
|
185 |
Same as AR_Processing |
186 |
|
187 |
=item OVERDUE |
188 |
|
189 |
* Source file : misc/cronjobs/thirdparty/TalkingTech_itiva_outbound.pl |
190 |
* Trigger : Uses overdue trigger |
191 |
* Detail syntax : No repeating detail. |
192 |
* Available data : <<borrowers.*>>, <<biblio.*>>, <<biblioitems.*>> |
193 |
* Message transports : Phone only |
194 |
|
195 |
=item PREOVERDUE |
196 |
|
197 |
Same as OVERDUE |
198 |
|
199 |
=item RESERVE |
200 |
|
201 |
Same as OVERDUE |
202 |
|
203 |
=back |
204 |
|
205 |
=head2 Holds |
206 |
|
207 |
=over |
208 |
|
209 |
=item HOLD |
210 |
|
211 |
* Source file : C4/Reserves.pm |
212 |
* Trigger : Triggered by filled hold |
213 |
* Detail syntax : No repeating detail. |
214 |
* Available data : <<reserves.*>>, <<branches.*>> (linked by reserves.branchcode), |
215 |
<<borrowers.*>> (linked by reserves.borrowernumber), |
216 |
<<biblio.*>> (linked by reserves.biblionumber) and |
217 |
<<items.*>> (linked by items.itemnumber) |
218 |
|
219 |
The letter code for trapped/filled/available holds defaults to HOLD, however any notice with the name |
220 |
'Hold_Filled' may fill this role. |
221 |
|
222 |
=item HOLDPLACED |
223 |
|
224 |
* Source file : C4/Reserves.pm |
225 |
* Trigger : Triggered by placed hold |
226 |
* Detail syntax : No repeating detail |
227 |
* Available data : <<branches.*>> |
228 |
(as populated by C4::Branch::GetBranchDetail($borrower->{branchcode}), |
229 |
<<borrowers.*>>, <<biblio.*>> and <<items.*>> will be expanded for the |
230 |
item placed on hold. Note that <<items.*>> will not be populated for |
231 |
'next-available' (i.e. bib-level) holds. |
232 |
|
233 |
=item HOLD_SLIP |
234 |
|
235 |
* Source file : C4/Reserves.pm |
236 |
* Trigger : Triggered by placed hold |
237 |
* Detail syntax : No repeating detail. |
238 |
* Available data : See HOLD |
239 |
* Message transports : Set as 'email'. |
240 |
|
241 |
|
242 |
=back |
243 |
|
244 |
=head2 Suggestions |
245 |
|
246 |
=over |
247 |
|
248 |
=item ASKED |
249 |
|
250 |
* Source file : C4/Suggestions.pm |
251 |
* Trigger : ? |
252 |
* Detail syntax : No repeating detail. |
253 |
* Available data : <<branches>>, <<borrowers>>, <<suggestions>>, <<biblio>> |
254 |
|
255 |
=item CHECKED |
256 |
|
257 |
|
258 |
* Source file : C4/Suggestions.pm |
259 |
* Trigger : ? |
260 |
* Detail syntax : No repeating detail. |
261 |
* Available data : <<branches>>, <<borrowers>>, <<suggestions>>, <<biblio>> |
262 |
|
263 |
=item ACCEPTED |
264 |
|
265 |
* Source file : C4/Suggestions.pm |
266 |
* Trigger : ? |
267 |
* Detail syntax : No repeating detail. |
268 |
* Available data : <<branches>>, <<borrowers>>, <<suggestions>>, <<biblio>> |
269 |
|
270 |
=item REJECTED |
271 |
|
272 |
* Source file : C4/Suggestions.pm |
273 |
* Trigger : ? |
274 |
* Detail syntax : No repeating detail. |
275 |
* Available data : <<branches>>, <<borrowers>>, <<suggestions>>, <<biblio>> |
276 |
|
277 |
=item TO_PROCESS |
278 |
|
279 |
* Source file : misc/cronjobs/notice_unprocessed_suggestions.pl |
280 |
* Trigger : ? |
281 |
* Detail syntax : No repeating detail. |
282 |
* Available data : <<branches>>, <<borrowers>>, <<suggestions>> |
283 |
|
284 |
=back |
285 |
|
286 |
=head2 Patrons |
287 |
|
288 |
=over |
289 |
|
290 |
=item OPAC_REG_VERIFY |
291 |
|
292 |
* Source file : opac/opac-memberentry.pl |
293 |
* Trigger : Triggered by patron self registration |
294 |
* Detail syntax : No repeating detail |
295 |
* Available data : <<OPACBaseURL>>, <<borrower_modifications.verification_token>> |
296 |
|
297 |
=item SHARE_INVITE |
298 |
|
299 |
* Source file : opac/opac-shareshelf.pl |
300 |
* Trigger : Triggered by list share |
301 |
* Detail syntax : No repeating detail |
302 |
* Available data : <<borrowers.*>>, <<listname>>, <<shareurl>> |
303 |
|
304 |
=item SHARE_ACCEPT |
305 |
|
306 |
* Source file : opac/opac-shareshelf.pl |
307 |
* Trigger : Triggered by patron accepting list. |
308 |
* Detail syntax : No repeating detail |
309 |
* Available data : <<borrowers.*>>, <<listname>> |
310 |
|
311 |
=item ACCTDETAILS |
312 |
|
313 |
* Source file : members/memberentry.pl |
314 |
* Trigger : Triggered by account creation. |
315 |
* Detail syntax : No repeating detail. |
316 |
* Available data : ? |
317 |
|
318 |
|
319 |
=item MEMBERSHIP_EXPIRY |
320 |
|
321 |
* Source file : misc/cronjobs/membership_expiry.pl |
322 |
* Trigger : Triggered by account expiration. |
323 |
* Detail syntax : No repeating detail. |
324 |
* Available data : <<borrowers.*>> and <<branches.*>> are available in the notice. |
325 |
|
326 |
=item DISCHARGE |
327 |
|
328 |
* Source file : Koha/Patron/Discharge.pm |
329 |
* Trigger : ? |
330 |
* Detail syntax : No repeating detail. |
331 |
* Available data : <<borrowers.*>>, <<branches.*>> |
332 |
|
333 |
=item PASSWORD_RESET |
334 |
|
335 |
* Source file : Koha/Patron/Password/Recovery.pm |
336 |
* Trigger : ? |
337 |
* Detail syntax : No repeating detail. |
338 |
* Available data : <<passwordreseturl>> => $uuidLink, <<user>> => $borrower->userid |
339 |
|
340 |
=back |
341 |
|
342 |
=head2 Other modules |
343 |
|
344 |
=over |
345 |
|
346 |
=item ACQ_NOTIF_ON_RECEIV |
347 |
|
348 |
* Source file : C4/Acquisition.pm |
349 |
* Trigger : Triggered by acquisitions receipt of watched item. |
350 |
* Detail syntax : No repeating detail. |
351 |
* Available data : <<branches.*>>, <<borrowers.*>>, <<biblio.*>>, <<aqorders.*>> |
352 |
|
353 |
=item CLAIMSERIAL |
354 |
|
355 |
* Source file : serials/claims.pl |
356 |
* Trigger : ? |
357 |
* Detail syntax : As far as I can tell, lines containing <<serial.*>>, <<subscription.*>>, |
358 |
<<biblio.*>> or <<aqbooksellers.*>> will be repeated for |
359 |
each selected serialid. |
360 |
* Available data : <<serial.*>>, <<subscription.*>>, <<branches.*>>, <<aqbooksellers.*>>, |
361 |
<<aqcontacts.*>>. |
362 |
|
363 |
Letter code is chosen via a drop-down on serials/claims.pl, all letters having the module |
364 |
'claimissues' will show in the selection list. |
365 |
|
366 |
=back |