notify on custom field change, #11274
[freeside.git] / rt / etc / initialdata
1 # Initial data for a fresh RT3 Installation.
2
3 @Users = (
4     {  Name         => 'root',
5        Gecos        => 'root',
6        RealName     => 'Enoch Root',
7        Password     => 'password',
8        EmailAddress => "root\@localhost",
9        Comments     => 'SuperUser',
10        Privileged   => '1',
11     },
12 );
13
14 @Groups = (
15 );
16
17 @Queues = ({ Name              => 'General',
18              Description       => 'The default queue',
19              CorrespondAddress => "",
20              CommentAddress    => "", },
21            { Name        => '___Approvals',
22              Description => 'A system-internal queue for the approvals system',
23              Disabled    => 2, } );
24
25 @ScripActions = (
26
27     {  Name        => 'Autoreply To Requestors',    # loc
28        Description =>
29 'Always sends a message to the requestors independent of message sender' ,                                            # loc
30        ExecModule => 'Autoreply',
31        Argument   => 'Requestor' },
32     { Name        => 'Notify Requestors',                    # loc
33       Description => 'Sends a message to the requestors',    # loc
34       ExecModule  => 'Notify',
35       Argument    => 'Requestor' },
36     { Name        => 'Notify Owner as Comment',              # loc
37       Description => 'Sends mail to the owner',              # loc
38       ExecModule  => 'NotifyAsComment',
39       Argument    => 'Owner' },
40     { Name        => 'Notify Owner',                         # loc
41       Description => 'Sends mail to the owner',              # loc
42       ExecModule  => 'Notify',
43       Argument    => 'Owner' },
44     { Name        => 'Notify Ccs as Comment',              # loc
45       Description => 'Sends mail to the Ccs as a comment', # loc
46       ExecModule  => 'NotifyAsComment',
47       Argument    => 'Cc' },
48     { Name        => 'Notify Ccs',                                   # loc
49       Description => 'Sends mail to the Ccs',                        # loc
50       ExecModule  => 'Notify',
51       Argument    => 'Cc' },
52     { Name        => 'Notify AdminCcs as Comment',                        # loc
53       Description => 'Sends mail to the administrative Ccs as a comment', # loc
54       ExecModule  => 'NotifyAsComment',
55       Argument    => 'AdminCc' },
56     { Name        => 'Notify AdminCcs',                                   # loc
57       Description => 'Sends mail to the administrative Ccs',              # loc
58       ExecModule  => 'Notify',
59       Argument    => 'AdminCc' },
60
61     { Name        => 'Notify Requestors and Ccs as Comment',              # loc
62       Description => 'Send mail to requestors and Ccs as a comment',      # loc
63       ExecModule  => 'NotifyAsComment',
64       Argument    => 'Requestor,Cc' },
65
66     { Name        => 'Notify Requestors and Ccs',                         # loc
67       Description => 'Send mail to requestors and Ccs',                   # loc
68       ExecModule  => 'Notify',
69       Argument    => 'Requestor,Cc' },
70
71     { Name        => 'Notify Owner, Requestors, Ccs and AdminCcs as Comment',    # loc
72       Description => 'Send mail to owner and all watchers as a "comment"',          # loc
73       ExecModule  => 'NotifyAsComment',
74       Argument    => 'All' },
75     { Name        => 'Notify Owner, Requestors, Ccs and AdminCcs',               # loc
76       Description => 'Send mail to owner and all watchers',                         # loc
77       ExecModule  => 'Notify',
78       Argument    => 'All' },
79     { Name        => 'Notify Other Recipients as Comment',                # loc
80       Description => 'Sends mail to explicitly listed Ccs and Bccs',      # loc
81       ExecModule  => 'NotifyAsComment',
82       Argument    => 'OtherRecipients' },
83     { Name        => 'Notify Other Recipients',                           # loc
84       Description => 'Sends mail to explicitly listed Ccs and Bccs',      # loc
85       ExecModule  => 'Notify',
86       Argument    => 'OtherRecipients' },
87     { Name        => 'User Defined',                                      # loc
88       Description => 'Perform a user-defined action',                     # loc
89       ExecModule  => 'UserDefined', },
90     {  Name        => 'Create Tickets',                                    # loc
91        Description =>
92          'Create new tickets based on this scrip\'s template',             # loc
93        ExecModule => 'CreateTickets', },
94     { Name        => 'Open Tickets',                                      # loc
95       Description => 'Open tickets on correspondence',                    # loc
96       ExecModule  => 'AutoOpen' },
97     { Name        => 'Extract Subject Tag',                               # loc
98       Description => 'Extract tags from a Transaction\'s subject and add them to the Ticket\'s subject.', # loc
99       ExecModule  => 'ExtractSubjectTag' },
100
101     #freeside
102     { Name        => 'Set Priority',
103       Description => 'Set ticket priority',
104       ExecModule  => 'SetPriority',
105       Argument    => '',
106     },
107 );
108
109 @ScripConditions = (
110     { Name                 => 'On Create',                                # loc
111       Description          => 'When a ticket is created',                 # loc
112       ApplicableTransTypes => 'Create',
113       ExecModule           => 'AnyTransaction', },
114
115     { Name                 => 'On Transaction',                           # loc
116       Description          => 'When anything happens',                    # loc
117       ApplicableTransTypes => 'Any',
118       ExecModule           => 'AnyTransaction', },
119     {
120
121       Name                 => 'On Correspond',                             # loc
122       Description          => 'Whenever correspondence comes in',          # loc
123       ApplicableTransTypes => 'Correspond',
124       ExecModule           => 'AnyTransaction', },
125
126     {
127
128       Name                 => 'On Comment',                                # loc
129       Description          => 'Whenever comments come in',                 # loc
130       ApplicableTransTypes => 'Comment',
131       ExecModule           => 'AnyTransaction' },
132     {
133
134       Name                 => 'On Status Change',                          # loc
135       Description          => 'Whenever a ticket\'s status changes',       # loc
136       ApplicableTransTypes => 'Status',
137       ExecModule           => 'AnyTransaction',
138
139     },
140     {
141
142       Name                 => 'On Priority Change',                       # loc
143       Description          => 'Whenever a ticket\'s priority changes',    # loc
144       ApplicableTransTypes => 'Set',
145       ExecModule           => 'PriorityChange',
146     },
147     {
148
149       Name                 => 'On Owner Change',                           # loc
150       Description          => 'Whenever a ticket\'s owner changes',        # loc
151       ApplicableTransTypes => 'Any',
152       ExecModule           => 'OwnerChange',
153
154     },
155     {
156
157       Name                 => 'On Queue Change',                           # loc
158       Description          => 'Whenever a ticket\'s queue changes',        # loc
159       ApplicableTransTypes => 'Set',
160       ExecModule           => 'QueueChange',
161
162     },
163     {  Name                 => 'On Resolve',                               # loc
164        Description          => 'Whenever a ticket is resolved',            # loc
165        ApplicableTransTypes => 'Status',
166        ExecModule           => 'StatusChange',
167        Argument             => 'resolved'
168
169     },
170     {  Name                 => 'On Reject',                                # loc
171        Description          => 'Whenever a ticket is rejected',            # loc
172        ApplicableTransTypes => 'Status',
173        ExecModule           => 'StatusChange',
174        Argument             => 'rejected'
175
176     },
177     {  Name                 => 'User Defined',                             # loc
178        Description          => 'Whenever a user-defined condition occurs', # loc
179        ApplicableTransTypes => 'Any',
180        ExecModule           => 'UserDefined'
181
182     },
183
184     {  Name                 => 'On Close',                                 # loc
185        Description          => 'Whenever a ticket is closed', # loc
186        ApplicableTransTypes => 'Status,Set',
187        ExecModule           => 'CloseTicket',
188     },
189     {  Name                 => 'On Reopen',                                # loc
190        Description          => 'Whenever a ticket is reopened', # loc
191        ApplicableTransTypes => 'Status,Set',
192        ExecModule           => 'ReopenTicket',
193     },
194
195     #freeside
196     {  Name                 => 'On Custom Field Transaction',
197        Description          => 'When a custom field is changed',
198        ExecModule           => 'CustomFieldTransaction',
199        ApplicableTransTypes => 'Any',
200     },
201     {  Name                 => 'On Custom Field Change',
202        Description          => 'When a custom field is changed to some value',
203        ExecModule           => 'CustomFieldChange',
204        ApplicableTransTypes => 'Any',
205     },
206
207 );
208
209 @Templates = (
210     { Queue       => '0',
211       Name        => 'Blank',                                             # loc
212       Description => 'A blank template',                                  # loc
213       Content     => '', },
214     {  Queue       => '0',
215        Name        => 'Autoreply',                                         # loc
216        Description => 'Default Autoresponse template',                     # loc
217        Content     => 'Subject: AutoReply: {$Ticket->Subject}
218
219
220 Greetings,
221
222 This message has been automatically generated in response to the
223 creation of a trouble ticket regarding:
224         "{$Ticket->Subject()}", 
225 a summary of which appears below.
226
227 There is no need to reply to this message right now.  Your ticket has been
228 assigned an ID of [{$Ticket->QueueObj->SubjectTag || $rtname} #{$Ticket->id()}].
229
230 Please include the string:
231
232          [{$Ticket->QueueObj->SubjectTag || $rtname} #{$Ticket->id}]
233
234 in the subject line of all future correspondence about this issue. To do so, 
235 you may reply to this message.
236
237                         Thank you,
238                         {$Ticket->QueueObj->CorrespondAddress()}
239
240 -------------------------------------------------------------------------
241 {$Transaction->Content()}
242 '
243     },
244
245     {  Queue       => '0',
246        Name        => 'Transaction',                     # loc
247        Description => 'Default transaction template',    # loc
248        Content     => 'RT-Attach-Message: yes
249
250
251 {$Transaction->CreatedAsString}: Request {$Ticket->id} was acted upon.
252  Transaction: {$Transaction->Description}
253        Queue: {$Ticket->QueueObj->Name}
254      Subject: {$Transaction->Subject || $Ticket->Subject || "(No subject given)"}
255        Owner: {$Ticket->OwnerObj->Name}
256   Requestors: {$Ticket->RequestorAddresses}
257       Status: {$Ticket->Status}
258  Ticket <URL: {RT->Config->Get(\'WebURL\')}Ticket/Display.html?id={$Ticket->id} >
259
260
261 {$Transaction->Content()}
262 '
263     },
264
265     {
266
267       Queue       => '0',
268       Name        => 'Admin Correspondence',                     # loc
269       Description => 'Default admin correspondence template',    # loc
270       Content     => 'RT-Attach-Message: yes
271
272
273 <URL: {RT->Config->Get(\'WebURL\')}Ticket/Display.html?id={$Ticket->id} >
274
275 {$Transaction->Content()}
276 '
277     },
278
279     {  Queue       => '0',
280        Name        => 'Correspondence',                          # loc
281        Description => 'Default correspondence template',         # loc
282        Content     => 'RT-Attach-Message: yes
283
284 {$Transaction->Content()}
285 '
286     },
287
288     {  Queue       => '0',
289        Name        => 'Admin Comment',                           # loc
290        Description => 'Default admin comment template',          # loc
291        Content     =>
292 'Subject: [Comment] {my $s=($Transaction->Subject||$Ticket->Subject); $s =~ s/\\[Comment\\]\\s*//g; $s =~ s/^Re:\\s*//i; $s;}
293 RT-Attach-Message: yes
294
295
296 {RT->Config->Get(\'WebURL\')}Ticket/Display.html?id={$Ticket->id}
297 This is a comment.  It is not sent to the Requestor(s):
298
299 {$Transaction->Content()}
300 '
301     },
302
303     {  Queue       => '0',
304        Name        => 'Status Change',                                     # loc
305        Description => 'Ticket status changed',                             # loc
306        Content     => 'Subject: Status Changed to: {$Transaction->NewValue}
307
308
309 {RT->Config->Get(\'WebURL\')}Ticket/Display.html?id={$Ticket->id}
310
311 {$Transaction->Content()}
312 '
313     },
314
315     {
316
317       Queue       => '0',
318       Name        => 'Resolved',                 # loc
319       Description => 'Ticket Resolved',          # loc
320       Content     => 'Subject: Resolved: {$Ticket->Subject}
321
322 According to our records, your request has been resolved. If you have any
323 further questions or concerns, please respond to this message.
324 '
325     },
326     {  Queue       => '___Approvals',
327        Name        => "New Pending Approval",    # loc
328        Description =>
329          "Notify Owners and AdminCcs of new items pending their approval", # loc
330        Content => 'Subject: New Pending Approval: {$Ticket->Subject}
331
332 Greetings,
333
334 There is a new item pending your approval: "{$Ticket->Subject()}", 
335 a summary of which appears below.
336
337 Please visit {RT->Config->Get(\'WebURL\')}Approvals/Display.html?id={$Ticket->id}
338 to approve or reject this ticket, or {RT->Config->Get(\'WebURL\')}Approvals/ to
339 batch-process all your pending approvals.
340
341 -------------------------------------------------------------------------
342 {$Transaction->Content()}
343 '
344     },
345     {  Queue       => '___Approvals',
346        Name        => "Approval Passed",    # loc
347        Description =>
348          "Notify Requestor of their ticket has been approved by some approver", # loc
349        Content => 'Subject: Ticket Approved: {$Ticket->Subject}
350
351 Greetings,
352
353 Your ticket has been approved by { eval { $Approver->Name } }.
354 Other approvals may be pending.
355
356 Approver\'s notes: { $Notes }
357 '
358     },
359     {  Queue       => '___Approvals',
360        Name        => "All Approvals Passed",    # loc
361        Description =>
362          "Notify Requestor of their ticket has been approved by all approvers", # loc
363        Content => 'Subject: Ticket Approved: {$Ticket->Subject}
364
365 Greetings,
366
367 Your ticket has been approved by { eval { $Approver->Name } }.
368 Its Owner may now start to act on it.
369
370 Approver\'s notes: { $Notes }
371 '
372     },
373     {  Queue       => '___Approvals',
374        Name        => "Approval Rejected",    # loc
375        Description =>
376          "Notify Owner of their rejected ticket", # loc
377        Content => 'Subject: Ticket Rejected: {$Ticket->Subject}
378
379 Greetings,
380
381 Your ticket has been rejected by { eval { $Approver->Name } }.
382
383 Approver\'s notes: { $Notes }
384 '
385     },
386     {  Queue       => '___Approvals',
387        Name        => "Approval Ready for Owner",    # loc
388        Description =>
389          "Notify Owner of their ticket has been approved and is ready to be acted on", # loc
390        Content => 'Subject: Ticket Approved: {$Ticket->Subject}
391
392 Greetings,
393
394 The ticket has been approved, you may now start to act on it.
395
396 '
397     },
398     {  Queue       => 0,
399        Name        => "Forward",    # loc
400        Description => "Heading of a forwarded message", # loc
401        Content => q{
402 This is a forward of transaction #{$Transaction->id} of ticket #{ $Ticket->id }
403 }
404     },
405     {  Queue       => 0,
406        Name        => "Forward Ticket",    # loc
407        Description => "Heading of a forwarded Ticket", # loc
408        Content => q{
409
410 This is a forward of ticket #{ $Ticket->id }
411 }
412     },
413     {  Queue       => 0,
414        Name        => "Error: public key",    # loc
415        Description =>
416          "Inform user that he has problems with public key and couldn't recieve encrypted content", # loc
417        Content => q{Subject: We have no your public key or it's wrong
418
419 You received this message as we have no your public PGP key or we have a problem with your key. Inform the administrator about the problem.
420 }
421     },
422     {  Queue       => 0,
423        Name        => "Error to RT owner: public key",    # loc
424        Description =>
425          "Inform RT owner that user(s) have problems with public keys", # loc
426        Content => q{Subject: Some users have problems with public keys
427
428 You received this message as RT has problems with public keys of the following user:
429 {
430     foreach my $e ( @BadRecipients ) {
431         $OUT .= "* ". $e->{'Message'} ."\n";
432     }
433 }}
434     },
435     {  Queue       => 0,
436        Name        => "Error: no private key",    # loc
437        Description =>
438          "Inform user that we received an encrypted email and we have no private keys to decrypt", # loc
439        Content => q{Subject: we received message we cannot decrypt
440
441 You sent an encrypted message with subject '{ $Message->head->get('Subject') }',
442 but we have no private key it's encrypted to.
443
444 Please, check that you encrypt messages with correct keys
445 or contact the system administrator.}
446     },
447     {  Queue       => 0,
448        Name        => "Error: bad GnuPG data",    # loc
449        Description =>
450          "Inform user that a message he sent has invalid GnuPG data", # loc
451        Content => q{Subject: We received a message we cannot handle
452
453 You sent us a message that we cannot handle due to corrupted GnuPG signature or encrypted block. we get the following error(s):
454 { foreach my $msg ( @Messages ) {
455     $OUT .= "* $msg\n";
456   }
457 }}
458     },
459     {  Queue       => 0,
460        Name        => "PasswordChange",    # loc
461        Description =>
462          "Inform user that his password has been reset", # loc
463        Content => q{Subject: [{RT->Config->Get('rtname')}] Password reset
464
465 Greetings,
466
467 Someone at {$ENV{'REMOTE_ADDR'}} requested a password reset for you on {RT->Config->Get('WebURL')}
468
469 Your new password is:
470   {$NewPassword}
471 }
472     },
473
474                {   Queue       => '0',
475                    Name        => 'Email Digest',    # loc
476                    Description => 'Email template for periodic notification digests',  # loc
477                    Content => q[Subject: RT Email Digest
478
479 { $Argument }
480 ],
481                },
482
483 {
484     Queue       => 0,
485     Name        => "Error: Missing dashboard",    # loc
486     Description =>
487       "Inform user that a dashboard he subscribed to is missing", # loc
488     Content => q{Subject: [{RT->Config->Get('rtname')}] Missing dashboard!
489
490 Greetings,
491
492 You are subscribed to a dashboard that is currently missing. Most likely, the dashboard was deleted.
493
494 RT will remove this subscription as it is no longer useful. Here's the information RT had about your subscription:
495
496 DashboardID:  { $SubscriptionObj->SubValue('DashboardId') }
497 Frequency:    { $SubscriptionObj->SubValue('Frequency') }
498 Hour:         { $SubscriptionObj->SubValue('Hour') }
499 {
500     $SubscriptionObj->SubValue('Frequency') eq 'weekly'
501     ? "Day of week:  " . $SubscriptionObj->SubValue('Dow')
502     : $SubscriptionObj->SubValue('Frequency') eq 'monthly'
503       ? "Day of month: " . $SubscriptionObj->SubValue('Dom')
504       : ''
505 }
506 }
507 },
508     {  Queue       => 0,
509        Name        => 'Custom Field Transaction',
510        Description => 'Custom field value changed',
511        Content     => q[Subject: {$Transaction->BriefDescription()}
512
513 {RT->Config->Get('WebURL')}Ticket/Display.html?id={$Ticket->id}
514
515 {$Transaction->Content()}
516 ],
517     },
518
519 );
520 # }}}
521
522 @Scrips = (
523     {  Description    => 'On Correspond Open Tickets',
524        ScripCondition => 'On Correspond',
525        ScripAction    => 'Open Tickets',
526        Template       => 'Blank' },
527     {  Description    => 'On Owner Change Notify Owner',
528        ScripCondition => 'On Owner Change',
529        ScripAction    => 'Notify Owner',
530        Template       => 'Transaction' },
531     {  Description    => 'On Create Autoreply To Requestors',
532        ScripCondition => 'On Create',
533        ScripAction    => 'AutoReply To Requestors',
534        Template       => 'AutoReply' },
535     {  Description    => 'On Create Notify AdminCcs',
536        ScripCondition => 'On Create',
537        ScripAction    => 'Notify AdminCcs',
538        Template       => 'Transaction' },
539     {  Description    => 'On Correspond Notify AdminCcs',
540        ScripCondition => 'On Correspond',
541        ScripAction    => 'Notify AdminCcs',
542        Template       => 'Admin Correspondence' },
543     {  Description    => 'On Correspond Notify Requestors and Ccs',
544        ScripCondition => 'On Correspond',
545        ScripAction    => 'Notify Requestors And Ccs',
546        Template       => 'Correspondence' },
547     {  Description    => 'On Correspond Notify Other Recipients',
548        ScripCondition => 'On Correspond',
549        ScripAction    => 'Notify Other Recipients',
550        Template       => 'Correspondence' },
551     {  Description    => 'On Comment Notify AdminCcs as Comment',
552        ScripCondition => 'On Comment',
553        ScripAction    => 'Notify AdminCcs As Comment',
554        Template       => 'Admin Comment' },
555     {  Description    => 'On Comment Notify Other Recipients as Comment',
556        ScripCondition => 'On Comment',
557        ScripAction    => 'Notify Other Recipients As Comment',
558        Template       => 'Correspondence' },
559     {  Description    => 'On Resolve Notify Requestors',
560        ScripCondition => 'On Resolve',
561        ScripAction    => 'Notify Requestors',
562        Template       => 'Resolved' },
563     {  Description    => "On transaction, add any tags in the transaction's subject to the ticket's subject",
564        ScripCondition => 'On Transaction',
565        ScripAction    => 'Extract Subject Tag',
566        Template       => 'Blank' },
567 );
568
569 @ACL = (
570     { UserId => 'root',        # - principalid
571       Right  => 'SuperUser', },
572
573     { GroupDomain => 'SystemInternal',
574       GroupType => 'privileged',
575       Right  => 'ShowApprovalsTab', },
576
577 );
578
579 # Predefined searches
580
581 @Attributes = (
582     { Name => 'Search - My Tickets',
583       Description => '[_1] highest priority tickets I own', # loc
584       Content     =>
585       { Format =>  q{'<a href="__WebPath__/Ticket/Display.html?id=__id__">__id__</a>/TITLE:#',}
586                  . q{'<a href="__WebPath__/Ticket/Display.html?id=__id__">__Subject__</a>/TITLE:Subject',}
587                  . q{Priority, QueueName, ExtendedStatus},
588         Query   => " Owner = '__CurrentUser__' AND ( Status = 'new' OR Status = 'open')",
589         OrderBy => 'Priority',
590         Order   => 'DESC'
591       },
592     },
593     { Name => 'Search - Unowned Tickets',
594       Description => '[_1] newest unowned tickets', # loc
595       Content     =>
596 # 'Take' #loc
597       { Format =>  q{'<a href="__WebPath__/Ticket/Display.html?id=__id__">__id__</a>/TITLE:#',}
598                  . q{'<a href="__WebPath__/Ticket/Display.html?id=__id__">__Subject__</a>/TITLE:Subject',}
599                  . q{QueueName, ExtendedStatus, CreatedRelative, }
600                  . q{'<A HREF="__WebPath__/Ticket/Display.html?Action=Take&id=__id__">__loc(Take)__</a>/TITLE:NBSP'},
601         Query   => " Owner = 'Nobody' AND ( Status = 'new' OR Status = 'open')",
602         OrderBy => 'Created',
603         Order   => 'DESC'
604       },
605     },
606     { Name => 'Search - Bookmarked Tickets',
607       Description => 'Bookmarked Tickets', #loc
608       Content     =>
609       { Format => q{'<a href="__WebPath__/Ticket/Display.html?id=__id__">__id__</a>/TITLE:#',}
610                 . q{'<a href="__WebPath__/Ticket/Display.html?id=__id__">__Subject__</a>/TITLE:Subject',}
611                 . q{Priority, QueueName, ExtendedStatus, Bookmark},
612         Query   => "id = '__Bookmarked__'",
613         OrderBy => 'LastUpdated',
614         Order   => 'DESC' },
615     },
616     { Name => 'HomepageSettings',
617       Description => 'HomepageSettings',
618       Content =>
619       { 'body' => # loc
620         [ { type => 'system', name => 'My Tickets' },
621           { type => 'system', name => 'Unowned Tickets' },
622           { type => 'system', name => 'Bookmarked Tickets' },
623           { type => 'component', name => 'QuickCreate' },
624         ],
625         'summary' => # loc
626         [
627           { type => 'component', name => 'MyReminders' },
628           { type => 'component', name => 'Quicksearch' },
629           { type => 'component', name => 'Dashboards' },
630           { type => 'component', name => 'RefreshHomepage' },
631         ],
632       },
633     },
634 );