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