1 # Initial data for a fresh RT installation.
6 RealName => 'Enoch Root',
7 Password => 'password',
8 EmailAddress => "root\@localhost",
9 Comments => 'SuperUser',
17 @Queues = ({ Name => 'General',
18 Description => 'The default queue',
19 CorrespondAddress => "",
20 CommentAddress => "", },
21 { Name => '___Approvals',
22 Lifecycle => 'approvals',
23 Description => 'A system-internal queue for the approvals system',
28 { Name => 'Autoreply To Requestors', # loc
30 'Always sends a message to the requestors independent of message sender' , # loc
31 ExecModule => 'Autoreply',
32 Argument => 'Requestor' },
33 { Name => 'Notify Requestors', # loc
34 Description => 'Sends a message to the requestors', # loc
35 ExecModule => 'Notify',
36 Argument => 'Requestor' },
37 { Name => 'Notify Owner as Comment', # loc
38 Description => 'Sends mail to the owner', # loc
39 ExecModule => 'NotifyAsComment',
40 Argument => 'Owner' },
41 { Name => 'Notify Owner', # loc
42 Description => 'Sends mail to the owner', # loc
43 ExecModule => 'Notify',
44 Argument => 'Owner' },
45 { Name => 'Notify Ccs as Comment', # loc
46 Description => 'Sends mail to the Ccs as a comment', # loc
47 ExecModule => 'NotifyAsComment',
49 { Name => 'Notify Ccs', # loc
50 Description => 'Sends mail to the Ccs', # loc
51 ExecModule => 'Notify',
53 { Name => 'Notify AdminCcs as Comment', # loc
54 Description => 'Sends mail to the administrative Ccs as a comment', # loc
55 ExecModule => 'NotifyAsComment',
56 Argument => 'AdminCc' },
57 { Name => 'Notify AdminCcs', # loc
58 Description => 'Sends mail to the administrative Ccs', # loc
59 ExecModule => 'Notify',
60 Argument => 'AdminCc' },
62 { Name => 'Notify Requestors and Ccs as Comment', # loc
63 Description => 'Send mail to requestors and Ccs as a comment', # loc
64 ExecModule => 'NotifyAsComment',
65 Argument => 'Requestor,Cc' },
68 # { Name => 'Notify Requestors and Ccs', # loc
69 # Description => 'Send mail to requestors and Ccs', # loc
70 # ExecModule => 'Notify',
71 # Argument => 'Requestor,Cc' },
74 { Name => 'Notify Owner, Requestors, Ccs and AdminCcs as Comment', # loc
75 Description => 'Send mail to owner and all watchers as a "comment"', # loc
76 ExecModule => 'NotifyAsComment',
78 { Name => 'Notify Owner, Requestors, Ccs and AdminCcs', # loc
79 Description => 'Send mail to owner and all watchers', # loc
80 ExecModule => 'Notify',
82 { Name => 'Notify Other Recipients as Comment', # loc
83 Description => 'Sends mail to explicitly listed Ccs and Bccs', # loc
84 ExecModule => 'NotifyAsComment',
85 Argument => 'OtherRecipients' },
87 # { Name => 'Notify Other Recipients', # loc
88 # Description => 'Sends mail to explicitly listed Ccs and Bccs', # loc
89 # ExecModule => 'Notify',
90 # Argument => 'OtherRecipients' },
92 { Name => 'User Defined', # loc
93 Description => 'Perform a user-defined action', # loc
94 ExecModule => 'UserDefined', },
95 { Name => 'Create Tickets', # loc
97 'Create new tickets based on this scrip\'s template', # loc
98 ExecModule => 'CreateTickets', },
99 { Name => 'Open Tickets', # loc
100 Description => 'Open tickets on correspondence', # loc
101 ExecModule => 'AutoOpen' },
102 { Name => 'Extract Subject Tag', # loc
103 Description => 'Extract tags from a Transaction\'s subject and add them to the Ticket\'s subject.', # loc
104 ExecModule => 'ExtractSubjectTag' },
107 { Name => 'Set Priority',
108 Description => 'Set ticket priority',
109 ExecModule => 'SetPriority',
112 { Name => 'Cancel Scheduled Resolve',
113 Description => 'Set ticket not to resolve in the future',
114 ExecModule => 'SetWillResolve',
117 { Name => 'Scheduled Resolve',
118 Description => 'Resolve ticket if its WillResolve date has passed',
119 ExecModule => 'ScheduledResolve',
122 # combine these into a single action so they can see each other in the headers
123 { Name => 'Notify Requestors, Ccs, and Other Recipients',
124 Description => 'Send mail to requestors, watchers, and explicit Ccs',
125 ExecModule => 'Notify',
126 Argument => 'Requestor,Cc,OtherRecipients',
131 { Name => 'On Create', # loc
132 Description => 'When a ticket is created', # loc
133 ApplicableTransTypes => 'Create',
134 ExecModule => 'AnyTransaction', },
136 { Name => 'On Transaction', # loc
137 Description => 'When anything happens', # loc
138 ApplicableTransTypes => 'Any',
139 ExecModule => 'AnyTransaction', },
142 Name => 'On Correspond', # loc
143 Description => 'Whenever correspondence comes in', # loc
144 ApplicableTransTypes => 'Correspond',
145 ExecModule => 'AnyTransaction', },
149 Name => 'On Forward', # loc
150 Description => 'Whenever a ticket or transaction is forwarded', # loc
151 ApplicableTransTypes => 'Forward Transaction,Forward Ticket',
152 ExecModule => 'AnyTransaction', },
156 Name => 'On Forward Ticket', # loc
157 Description => 'Whenever a ticket is forwarded', # loc
158 ApplicableTransTypes => 'Forward Ticket',
159 ExecModule => 'AnyTransaction', },
163 Name => 'On Forward Transaction', # loc
164 Description => 'Whenever a transaction is forwarded', # loc
165 ApplicableTransTypes => 'Forward Transaction',
166 ExecModule => 'AnyTransaction', },
170 Name => 'On Comment', # loc
171 Description => 'Whenever comments come in', # loc
172 ApplicableTransTypes => 'Comment',
173 ExecModule => 'AnyTransaction' },
176 Name => 'On Status Change', # loc
177 Description => 'Whenever a ticket\'s status changes', # loc
178 ApplicableTransTypes => 'Status',
179 ExecModule => 'AnyTransaction',
184 Name => 'On Priority Change', # loc
185 Description => 'Whenever a ticket\'s priority changes', # loc
186 ApplicableTransTypes => 'Set',
187 ExecModule => 'PriorityChange',
191 Name => 'On Owner Change', # loc
192 Description => 'Whenever a ticket\'s owner changes', # loc
193 ApplicableTransTypes => 'Any',
194 ExecModule => 'OwnerChange',
199 Name => 'On Queue Change', # loc
200 Description => 'Whenever a ticket\'s queue changes', # loc
201 ApplicableTransTypes => 'Set',
202 ExecModule => 'QueueChange',
205 { Name => 'On Resolve', # loc
206 Description => 'Whenever a ticket is resolved', # loc
207 ApplicableTransTypes => 'Status',
208 ExecModule => 'StatusChange',
209 Argument => 'resolved'
212 { Name => 'On Reject', # loc
213 Description => 'Whenever a ticket is rejected', # loc
214 ApplicableTransTypes => 'Status',
215 ExecModule => 'StatusChange',
216 Argument => 'rejected'
219 { Name => 'User Defined', # loc
220 Description => 'Whenever a user-defined condition occurs', # loc
221 ApplicableTransTypes => 'Any',
222 ExecModule => 'UserDefined'
226 { Name => 'On Close', # loc
227 Description => 'Whenever a ticket is closed', # loc
228 ApplicableTransTypes => 'Status,Set',
229 ExecModule => 'CloseTicket',
231 { Name => 'On Reopen', # loc
232 Description => 'Whenever a ticket is reopened', # loc
233 ApplicableTransTypes => 'Status,Set',
234 ExecModule => 'ReopenTicket',
238 { Name => 'On Custom Field Transaction',
239 Description => 'When a custom field is changed',
240 ExecModule => 'CustomFieldTransaction',
241 ApplicableTransTypes => 'Any',
243 { Name => 'On Custom Field Change',
244 Description => 'When a custom field is changed to some value',
245 ExecModule => 'CustomFieldChange',
246 ApplicableTransTypes => 'Any',
253 Name => 'Blank', # loc
254 Description => 'A blank template', # loc
257 Name => 'Autoreply', # loc
258 Description => 'Default Autoresponse template', # loc
259 Content => 'Subject: AutoReply: {$Ticket->Subject}
264 This message has been automatically generated in response to the
265 creation of a trouble ticket regarding:
266 "{$Ticket->Subject()}",
267 a summary of which appears below.
269 There is no need to reply to this message right now. Your ticket has been
270 assigned an ID of { $Ticket->SubjectTag }.
272 Please include the string:
274 { $Ticket->SubjectTag }
276 in the subject line of all future correspondence about this issue. To do so,
277 you may reply to this message.
280 {$Ticket->QueueObj->CorrespondAddress()}
282 -------------------------------------------------------------------------
283 {$Transaction->Content()}
288 Name => 'Transaction', # loc
289 Description => 'Default transaction template', # loc
290 Content => 'RT-Attach-Message: yes
293 {$Transaction->CreatedAsString}: Request {$Ticket->id} was acted upon.
294 Transaction: {$Transaction->Description}
295 Queue: {$Ticket->QueueObj->Name}
296 Subject: {$Transaction->Subject || $Ticket->Subject || "(No subject given)"}
297 Owner: {$Ticket->OwnerObj->Name}
298 Requestors: {$Ticket->RequestorAddresses}
299 Status: {$Ticket->Status}
300 Ticket <URL: {RT->Config->Get(\'WebURL\')}Ticket/Display.html?id={$Ticket->id} >
303 {$Transaction->Content()}
310 Name => 'Admin Correspondence', # loc
311 Description => 'Default admin correspondence template', # loc
312 Content => 'RT-Attach-Message: yes
315 <URL: {RT->Config->Get(\'WebURL\')}Ticket/Display.html?id={$Ticket->id} >
317 {$Transaction->Content()}
322 Name => 'Correspondence', # loc
323 Description => 'Default correspondence template', # loc
324 Content => 'RT-Attach-Message: yes
326 {$Transaction->Content()}
331 Name => 'Admin Comment', # loc
332 Description => 'Default admin comment template', # loc
334 'Subject: [Comment] {my $s=($Transaction->Subject||$Ticket->Subject||""); $s =~ s/\\[Comment\\]\\s*//g; $s =~ s/^Re:\\s*//i; $s;}
335 RT-Attach-Message: yes
338 {RT->Config->Get(\'WebURL\')}Ticket/Display.html?id={$Ticket->id}
339 This is a comment. It is not sent to the Requestor(s):
341 {$Transaction->Content()}
346 Name => 'Status Change', # loc
347 Description => 'Ticket status changed', # loc
348 Content => 'Subject: Status Changed to: {$Transaction->NewValue}
351 {RT->Config->Get(\'WebURL\')}Ticket/Display.html?id={$Ticket->id}
353 {$Transaction->Content()}
360 Name => 'Resolved', # loc
361 Description => 'Ticket Resolved', # loc
362 Content => 'Subject: Resolved: {$Ticket->Subject}
364 According to our records, your request has been resolved. If you have any
365 further questions or concerns, please respond to this message.
368 { Queue => '___Approvals',
369 Name => "New Pending Approval", # loc
371 "Notify Owners and AdminCcs of new items pending their approval", # loc
372 Content => 'Subject: New Pending Approval: {$Ticket->Subject}
376 There is a new item pending your approval: "{$Ticket->Subject()}",
377 a summary of which appears below.
379 Please visit {RT->Config->Get(\'WebURL\')}Approvals/Display.html?id={$Ticket->id}
380 to approve or reject this ticket, or {RT->Config->Get(\'WebURL\')}Approvals/ to
381 batch-process all your pending approvals.
383 -------------------------------------------------------------------------
384 {$Transaction->Content()}
387 { Queue => '___Approvals',
388 Name => "Approval Passed", # loc
390 "Notify Requestor of their ticket has been approved by some approver", # loc
391 Content => 'Subject: Ticket Approved: {$Ticket->Subject}
395 Your ticket has been approved by { eval { $Approver->Name } }.
396 Other approvals may be pending.
398 Approver\'s notes: { $Notes }
401 { Queue => '___Approvals',
402 Name => "All Approvals Passed", # loc
404 "Notify Requestor of their ticket has been approved by all approvers", # loc
405 Content => 'Subject: Ticket Approved: {$Ticket->Subject}
409 Your ticket has been approved by { eval { $Approver->Name } }.
410 Its Owner may now start to act on it.
412 Approver\'s notes: { $Notes }
415 { Queue => '___Approvals',
416 Name => "Approval Rejected", # loc
418 "Notify Owner of their rejected ticket", # loc
419 Content => 'Subject: Ticket Rejected: {$Ticket->Subject}
423 Your ticket has been rejected by { eval { $Approver->Name } }.
425 Approver\'s notes: { $Notes }
428 { Queue => '___Approvals',
429 Name => "Approval Ready for Owner", # loc
431 "Notify Owner of their ticket has been approved and is ready to be acted on", # loc
432 Content => 'Subject: Ticket Approved: {$Ticket->Subject}
436 The ticket has been approved, you may now start to act on it.
441 Name => "Forward", # loc
442 Description => "Heading of a forwarded message", # loc
444 This is a forward of transaction #{$Transaction->id} of ticket #{ $Ticket->id }
448 Name => "Forward Ticket", # loc
449 Description => "Heading of a forwarded Ticket", # loc
452 This is a forward of ticket #{ $Ticket->id }
456 Name => "Error: public key", # loc
458 "Inform user that he has problems with public key and couldn't recieve encrypted content", # loc
459 Content => q{Subject: We have no your public key or it's wrong
461 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.
465 Name => "Error to RT owner: public key", # loc
467 "Inform RT owner that user(s) have problems with public keys", # loc
468 Content => q{Subject: Some users have problems with public keys
470 You received this message as RT has problems with public keys of the following user:
472 foreach my $e ( @BadRecipients ) {
473 $OUT .= "* ". $e->{'Message'} ."\n";
478 Name => "Error: no private key", # loc
480 "Inform user that we received an encrypted email and we have no private keys to decrypt", # loc
481 Content => q{Subject: we received message we cannot decrypt
483 You sent an encrypted message with subject '{ $Message->head->get('Subject') }',
484 but we have no private key it's encrypted to.
486 Please, check that you encrypt messages with correct keys
487 or contact the system administrator.}
490 Name => "Error: bad GnuPG data", # loc
492 "Inform user that a message he sent has invalid GnuPG data", # loc
493 Content => q{Subject: We received a message we cannot handle
495 You sent us a message that we cannot handle due to corrupted GnuPG signature or encrypted block. we get the following error(s):
496 { foreach my $msg ( @Messages ) {
502 Name => "PasswordChange", # loc
504 "Inform user that his password has been reset", # loc
505 Content => q{Subject: [{RT->Config->Get('rtname')}] Password reset
509 Someone at {$ENV{'REMOTE_ADDR'}} requested a password reset for you on {RT->Config->Get('WebURL')}
511 Your new password is:
517 Name => 'Email Digest', # loc
518 Description => 'Email template for periodic notification digests', # loc
519 Content => q[Subject: RT Email Digest
527 Name => "Error: Missing dashboard", # loc
529 "Inform user that a dashboard he subscribed to is missing", # loc
530 Content => q{Subject: [{RT->Config->Get('rtname')}] Missing dashboard!
534 You are subscribed to a dashboard that is currently missing. Most likely, the dashboard was deleted.
536 RT will remove this subscription as it is no longer useful. Here's the information RT had about your subscription:
538 DashboardID: { $SubscriptionObj->SubValue('DashboardId') }
539 Frequency: { $SubscriptionObj->SubValue('Frequency') }
540 Hour: { $SubscriptionObj->SubValue('Hour') }
542 $SubscriptionObj->SubValue('Frequency') eq 'weekly'
543 ? "Day of week: " . $SubscriptionObj->SubValue('Dow')
544 : $SubscriptionObj->SubValue('Frequency') eq 'monthly'
545 ? "Day of month: " . $SubscriptionObj->SubValue('Dom')
551 Name => 'Custom Field Transaction',
552 Description => 'Custom field value changed',
553 Content => q[Subject: {$Transaction->BriefDescription()}
555 {RT->Config->Get('WebURL')}Ticket/Display.html?id={$Ticket->id}
557 {$Transaction->Content()}
564 { Description => 'On Correspond Open Tickets',
565 ScripCondition => 'On Correspond',
566 ScripAction => 'Open Tickets',
567 Template => 'Blank' },
568 { Description => 'On Owner Change Notify Owner',
569 ScripCondition => 'On Owner Change',
570 ScripAction => 'Notify Owner',
571 Template => 'Transaction' },
572 { Description => 'On Create Autoreply To Requestors',
573 ScripCondition => 'On Create',
574 ScripAction => 'AutoReply To Requestors',
575 Template => 'AutoReply' },
576 { Description => 'On Create Notify AdminCcs',
577 ScripCondition => 'On Create',
578 ScripAction => 'Notify AdminCcs',
579 Template => 'Transaction' },
580 { Description => 'On Correspond Notify AdminCcs',
581 ScripCondition => 'On Correspond',
582 ScripAction => 'Notify AdminCcs',
583 Template => 'Admin Correspondence' },
584 # { Description => 'On Correspond Notify Requestors and Ccs',
585 # ScripCondition => 'On Correspond',
586 # ScripAction => 'Notify Requestors And Ccs',
587 # Template => 'Correspondence' },
588 # { Description => 'On Correspond Notify Other Recipients',
589 # ScripCondition => 'On Correspond',
590 # ScripAction => 'Notify Other Recipients',
591 # Template => 'Correspondence' },
592 { Description => 'On Correspond Notify Requestors, Ccs, and Other Recipients',
593 ScripCondition => 'On Correspond',
594 ScripAction => 'Notify Requestors, Ccs, and Other Recipients',
595 Template => 'Correspondence', },
596 { Description => 'On Comment Notify AdminCcs as Comment',
597 ScripCondition => 'On Comment',
598 ScripAction => 'Notify AdminCcs As Comment',
599 Template => 'Admin Comment' },
600 { Description => 'On Comment Notify Other Recipients as Comment',
601 ScripCondition => 'On Comment',
602 ScripAction => 'Notify Other Recipients As Comment',
603 Template => 'Correspondence' },
604 { Description => 'On Resolve Notify Requestors',
605 ScripCondition => 'On Resolve',
606 ScripAction => 'Notify Requestors',
607 Template => 'Resolved' },
608 { Description => "On transaction, add any tags in the transaction's subject to the ticket's subject",
609 ScripCondition => 'On Transaction',
610 ScripAction => 'Extract Subject Tag',
611 Template => 'Blank' },
612 { Description => 'On Correspond, cancel future resolve',
613 ScripCondition => 'On Correspond',
614 ScripAction => 'Cancel Scheduled Resolve',
615 Template => 'Blank' },
619 { UserId => 'root', # - principalid
620 Right => 'SuperUser', },
622 { GroupDomain => 'SystemInternal',
623 GroupType => 'privileged',
624 Right => 'ShowApprovalsTab', },
628 # Predefined searches
631 { Name => 'Search - My Tickets',
632 Description => '[_1] highest priority tickets I own', # loc
634 { Format => q{'<a href="__WebPath__/Ticket/Display.html?id=__id__">__id__</a>/TITLE:#',}
635 . q{'<a href="__WebPath__/Ticket/Display.html?id=__id__">__Subject__</a>/TITLE:Subject',}
636 . q{Priority, QueueName, ExtendedStatus},
637 Query => " Owner = '__CurrentUser__' AND ( Status = 'new' OR Status = 'open')",
638 OrderBy => 'Priority',
642 { Name => 'Search - Unowned Tickets',
643 Description => '[_1] newest unowned tickets', # loc
646 { Format => q{'<a href="__WebPath__/Ticket/Display.html?id=__id__">__id__</a>/TITLE:#',}
647 . q{'<a href="__WebPath__/Ticket/Display.html?id=__id__">__Subject__</a>/TITLE:Subject',}
648 . q{QueueName, ExtendedStatus, CreatedRelative, }
649 . q{'<A HREF="__WebPath__/Ticket/Display.html?Action=Take&id=__id__">__loc(Take)__</a>/TITLE:NBSP'},
650 Query => " Owner = 'Nobody' AND ( Status = 'new' OR Status = 'open')",
651 OrderBy => 'Created',
655 { Name => 'Search - Bookmarked Tickets',
656 Description => 'Bookmarked Tickets', #loc
658 { Format => q{'<a href="__WebPath__/Ticket/Display.html?id=__id__">__id__</a>/TITLE:#',}
659 . q{'<a href="__WebPath__/Ticket/Display.html?id=__id__">__Subject__</a>/TITLE:Subject',}
660 . q{Priority, QueueName, ExtendedStatus, Bookmark},
661 Query => "id = '__Bookmarked__'",
662 OrderBy => 'LastUpdated',
666 Name => 'HomepageSettings',
667 Description => 'HomepageSettings',
673 name => 'My Tickets', # loc
677 name => 'Unowned Tickets' # loc
681 name => 'Bookmarked Tickets' # loc
685 name => 'QuickCreate' # loc
692 name => 'MyReminders' # loc
696 name => 'Quicksearch' # loc
700 name => 'Dashboards' # loc
704 name => 'RefreshHomepage' # loc
712 # Obsolete/erroneous scrips
714 # $Delete_Scrips{conditionname}{actionname}{templatename}
715 # exists, and the scrip was created by the system user, it
716 # will be deleted on upgrade. Lowercase all the names here.
720 'notify requestors and ccs' => { 'correspondence' => 1 },
721 'notify other recipients' => { 'correspondence' => 1 },
727 push @ScripActions, (
729 { Name => 'Extract Custom Field Values', # loc
730 Description => 'extract cf-values out of a message', # loc
731 ExecModule => 'ExtractCustomFieldValues' },
733 { Name => 'Extract Custom Field Values With Code in Template', # loc
734 Description => 'extract cf-values out of a message with a Text::Template template', # loc
735 ExecModule => 'ExtractCustomFieldValuesWithCodeInTemplate' }
741 Name => 'CustomFieldScannerExample', # loc
742 Description => 'Example Template for ExtractCustomFieldValues', # loc
743 Content => <<'EOTEXT'
745 # CF Name | Header name or "Body" | MatchString(re) | Postcmd | Options
747 #### Allowed Options:
749 # q - (quiet) Don't record a transaction for adding the custom field
751 # * - (wildcard) The MatchString regex should contain _two_
752 # capturing groups, the first of which is the CF name,
753 # the second of which is the value. If this option is
754 # given, the <cf-name> field is ignored.
758 # 1. Put the content of the "X-MI-Test" header into the "testcf"
760 # testcf|X-MI-Test|.*
762 # 2. Scan the body for Host:name and put name into the "bodycf" custom
764 # bodycf|Body|Host:\s*(\w+)
766 # 3. Scan the "X-MI-IP" header for an IP-Adresse and get the hostname
767 # by reverse-resolving it:
768 # Hostname|X-MI-IP|\d+\.\d+\.\d+\.\d+|use Socket; ($value) = gethostbyaddr(inet_aton($value),AF_INET);
770 # 4. scan the "CC" header for an many email addresses, and add them to
771 # a custom field named "parsedCCs". If "parsedCCs" is a multivalue
772 # CF, then this should yield separate values for all email adress
774 # parsedCCs|CC|.*|$value =~ s/^\s+//; $value =~ s/\s+$//;
776 # 5. Looks for an "Email:" field in the body of the email, then loads
777 # up that user and makes them privileged The blank first field
778 # means the automatic CustomField setting is not invoked.
779 # |Body|Email:\s*(.+)$|my $u = RT::User->new($RT::SystemUser); $u->LoadByEmail($value); $u->SetPrivileged(1)|
781 # 6. Looks for any text of the form "Set CF Name: Value" in the body,
782 # and sets the CF named "CF Name" to the given value, which may be
783 # multi-line. The '*' option controls the wildcard nature of this
786 # !Body!^Set ([^\n:]*?):\s*((?s).*?)(?:\Z|\n\Z|\n\n)!!*
788 # 7. Looks for the regex anywhere in the headers and stores the match
789 # in the AllHeaderSearch CF
790 # AllHeaderSearch|Headers|Site:\s*(\w+)
792 # 8. If you need to dynamically build your matching, and want to trigger on headers and body
793 # and invode some arbitrary code like example 5
796 # my $action = 'use My::Site; My::Site::SetSiteID( Ticket => $self->TicketObj, Site => $_ );';
798 # for my $regex (My::Site::ValidRegexps) {
799 # for my $from ('headers', 'body') {