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' },
61 { Name => 'Notify Owner and AdminCcs', # loc
62 Description => 'Sends mail to the Owner and administrative Ccs', # loc
63 ExecModule => 'Notify',
64 Argument => 'Owner,AdminCc' },
65 { Name => 'Notify Owner or AdminCcs', # loc
66 Description => 'Sends mail to the Owner if set, otherwise administrative Ccs', # loc
67 ExecModule => 'NotifyOwnerOrAdminCc',
69 { Name => 'Notify Requestors and Ccs as Comment', # loc
70 Description => 'Send mail to requestors and Ccs as a comment', # loc
71 ExecModule => 'NotifyAsComment',
72 Argument => 'Requestor,Cc' },
75 # { Name => 'Notify Requestors and Ccs', # loc
76 # Description => 'Send mail to requestors and Ccs', # loc
77 # ExecModule => 'Notify',
78 # Argument => 'Requestor,Cc' },
81 { Name => 'Notify Owner, Requestors, Ccs and AdminCcs as Comment', # loc
82 Description => 'Send mail to owner and all watchers as a "comment"', # loc
83 ExecModule => 'NotifyAsComment',
85 { Name => 'Notify Owner, Requestors, Ccs and AdminCcs', # loc
86 Description => 'Send mail to owner and all watchers', # loc
87 ExecModule => 'Notify',
89 { Name => 'Notify Other Recipients as Comment', # loc
90 Description => 'Sends mail to explicitly listed Ccs and Bccs', # loc
91 ExecModule => 'NotifyAsComment',
92 Argument => 'OtherRecipients' },
94 # { Name => 'Notify Other Recipients', # loc
95 # Description => 'Sends mail to explicitly listed Ccs and Bccs', # loc
96 # ExecModule => 'Notify',
97 # Argument => 'OtherRecipients' },
99 { Name => 'User Defined', # loc
100 Description => 'Perform a user-defined action', # loc
101 ExecModule => 'UserDefined', },
102 { Name => 'Create Tickets', # loc
104 'Create new tickets based on this scrip\'s template', # loc
105 ExecModule => 'CreateTickets', },
106 { Name => 'Open Tickets', # loc
107 Description => 'Open tickets on correspondence', # loc
108 ExecModule => 'AutoOpen' },
109 { Name => 'Extract Subject Tag', # loc
110 Description => 'Extract tags from a Transaction\'s subject and add them to the Ticket\'s subject.', # loc
111 ExecModule => 'ExtractSubjectTag' },
112 { Name => 'Send Forward', # loc
113 Description => 'Send forwarded message', # loc
114 ExecModule => 'SendForward', },
116 { Name => 'Set Priority',
117 Description => 'Set ticket priority',
118 ExecModule => 'SetPriority',
121 { Name => 'Cancel Scheduled Resolve',
122 Description => 'Set ticket not to resolve in the future',
123 ExecModule => 'SetWillResolve',
126 { Name => 'Scheduled Resolve',
127 Description => 'Resolve ticket if its WillResolve date has passed',
128 ExecModule => 'ScheduledResolve',
131 # combine these into a single action so they can see each other in the headers
132 { Name => 'Notify Requestors, Ccs, and Other Recipients',
133 Description => 'Send mail to requestors, watchers, and explicit Ccs',
134 ExecModule => 'Notify',
135 Argument => 'Requestor,Cc,OtherRecipients',
140 { Name => 'On Create', # loc
141 Description => 'When a ticket is created', # loc
142 ApplicableTransTypes => 'Create',
143 ExecModule => 'AnyTransaction', },
145 { Name => 'On Transaction', # loc
146 Description => 'When anything happens', # loc
147 ApplicableTransTypes => 'Any',
148 ExecModule => 'AnyTransaction', },
151 Name => 'On Correspond', # loc
152 Description => 'Whenever correspondence comes in', # loc
153 ApplicableTransTypes => 'Correspond',
154 ExecModule => 'AnyTransaction', },
158 Name => 'On Forward', # loc
159 Description => 'Whenever a ticket or transaction is forwarded', # loc
160 ApplicableTransTypes => 'Forward Transaction,Forward Ticket',
161 ExecModule => 'AnyTransaction', },
165 Name => 'On Forward Ticket', # loc
166 Description => 'Whenever a ticket is forwarded', # loc
167 ApplicableTransTypes => 'Forward Ticket',
168 ExecModule => 'AnyTransaction', },
172 Name => 'On Forward Transaction', # loc
173 Description => 'Whenever a transaction is forwarded', # loc
174 ApplicableTransTypes => 'Forward Transaction',
175 ExecModule => 'AnyTransaction', },
179 Name => 'On Comment', # loc
180 Description => 'Whenever comments come in', # loc
181 ApplicableTransTypes => 'Comment',
182 ExecModule => 'AnyTransaction' },
185 Name => 'On Status Change', # loc
186 Description => 'Whenever a ticket\'s status changes', # loc
187 ApplicableTransTypes => 'Status',
188 ExecModule => 'AnyTransaction',
193 Name => 'On Priority Change', # loc
194 Description => 'Whenever a ticket\'s priority changes', # loc
195 ApplicableTransTypes => 'Set',
196 ExecModule => 'PriorityChange',
200 Name => 'On Owner Change', # loc
201 Description => 'Whenever a ticket\'s owner changes', # loc
202 ApplicableTransTypes => 'Any',
203 ExecModule => 'OwnerChange',
208 Name => 'On Queue Change', # loc
209 Description => 'Whenever a ticket\'s queue changes', # loc
210 ApplicableTransTypes => 'Set',
211 ExecModule => 'QueueChange',
214 { Name => 'On Resolve', # loc
215 Description => 'Whenever a ticket is resolved', # loc
216 ApplicableTransTypes => 'Status',
217 ExecModule => 'StatusChange',
218 Argument => 'resolved'
221 { Name => 'On Reject', # loc
222 Description => 'Whenever a ticket is rejected', # loc
223 ApplicableTransTypes => 'Status',
224 ExecModule => 'StatusChange',
225 Argument => 'rejected'
228 { Name => 'User Defined', # loc
229 Description => 'Whenever a user-defined condition occurs', # loc
230 ApplicableTransTypes => 'Any',
231 ExecModule => 'UserDefined'
235 { Name => 'On Close', # loc
236 Description => 'Whenever a ticket is closed', # loc
237 ApplicableTransTypes => 'Status,Set',
238 ExecModule => 'CloseTicket',
240 { Name => 'On Reopen', # loc
241 Description => 'Whenever a ticket is reopened', # loc
242 ApplicableTransTypes => 'Status,Set',
243 ExecModule => 'ReopenTicket',
247 #{ Name => 'On Custom Field Transaction',
248 # Description => 'When a custom field is changed',
249 # ExecModule => 'CustomFieldTransaction',
250 # ApplicableTransTypes => 'Any',
252 #{ Name => 'On Custom Field Change',
253 # Description => 'When a custom field is changed to some value',
254 # ExecModule => 'CustomFieldChange',
255 # ApplicableTransTypes => 'Any',
262 Name => 'Blank', # loc
263 Description => 'A blank template', # loc
266 Name => 'Autoreply', # loc
267 Description => 'Plain text Autoresponse template', # loc
268 Content => 'Subject: AutoReply: {$Ticket->Subject}
273 This message has been automatically generated in response to the
274 creation of a trouble ticket regarding:
275 "{$Ticket->Subject()}",
276 a summary of which appears below.
278 There is no need to reply to this message right now. Your ticket has been
279 assigned an ID of { $Ticket->SubjectTag }.
281 Please include the string:
283 { $Ticket->SubjectTag }
285 in the subject line of all future correspondence about this issue. To do so,
286 you may reply to this message.
289 {$Ticket->QueueObj->CorrespondAddress()}
291 -------------------------------------------------------------------------
292 {$Transaction->Content()}
296 Name => 'Autoreply in HTML', # loc
297 Description => 'HTML Autoresponse template', # loc
298 Content => q[Subject: AutoReply: {$Ticket->Subject}
299 Content-Type: text/html
303 <p>This message has been automatically generated in response to the
304 creation of a trouble ticket regarding <b>{$Ticket->Subject()}</b>,
305 a summary of which appears below.</p>
307 <p>There is no need to reply to this message right now. Your ticket has been
308 assigned an ID of <b>{$Ticket->SubjectTag}</b>.</p>
310 <p>Please include the string <b>{$Ticket->SubjectTag}</b>
311 in the subject line of all future correspondence about this issue. To do so,
312 you may reply to this message.</p>
315 {$Ticket->QueueObj->CorrespondAddress()}</p>
318 {$Transaction->Content(Type => 'text/html')}
322 Name => 'Transaction', # loc
323 Description => 'Plain text transaction template', # loc
324 Content => 'RT-Attach-Message: yes
327 {$Transaction->CreatedAsString}: Request {$Ticket->id} was acted upon.
328 Transaction: {$Transaction->Description}
329 Queue: {$Ticket->QueueObj->Name}
330 Subject: {$Transaction->Subject || $Ticket->Subject || "(No subject given)"}
331 Owner: {$Ticket->OwnerObj->Name}
332 Requestors: {$Ticket->RequestorAddresses}
333 Status: {$Ticket->Status}
334 Ticket <URL: {RT->Config->Get(\'WebURL\')}Ticket/Display.html?id={$Ticket->id} >
337 {$Transaction->Content()}
341 Name => 'Transaction in HTML', # loc
342 Description => 'HTML transaction template', # loc
343 Content => 'RT-Attach-Message: yes
344 Content-Type: text/html
346 <b>{$Transaction->CreatedAsString}: Request <a href="{RT->Config->Get("WebURL")}Ticket/Display.html?id={$Ticket->id}">{$Ticket->id}</a> was acted upon by {$Transaction->CreatorObj->Name}.</b>
349 <tr><td align="right"><b>Transaction:</b></td><td>{$Transaction->Description}</td></tr>
350 <tr><td align="right"><b>Queue:</b></td><td>{$Ticket->QueueObj->Name}</td></tr>
351 <tr><td align="right"><b>Subject:</b></td><td>{$Transaction->Subject || $Ticket->Subject || "(No subject given)"} </td></tr>
352 <tr><td align="right"><b>Owner:</b></td><td>{$Ticket->OwnerObj->Name}</td></tr>
353 <tr><td align="right"><b>Requestors:</b></td><td>{$Ticket->RequestorAddresses}</td></tr>
354 <tr><td align="right"><b>Status:</b></td><td>{$Ticket->Status}</td></tr>
355 <tr><td align="right"><b>Ticket URL:</b></td><td><a href="{RT->Config->Get("WebURL")}Ticket/Display.html?id={$Ticket->id}">{RT->Config->Get("WebURL")}Ticket/Display.html?id={$Ticket->id}</a></td></tr>
359 {$Transaction->Content( Type => "text/html")}
362 # Shadow the global templates of the same name to suppress duplicate
363 # notifications until rules is ripped out.
364 { Queue => "___Approvals",
365 Name => "Transaction in HTML",
368 { Queue => "___Approvals",
369 Name => "Transaction",
375 Name => 'Admin Correspondence', # loc
376 Description => 'Plain text admin correspondence template', # loc
377 Content => 'RT-Attach-Message: yes
380 <URL: {RT->Config->Get(\'WebURL\')}Ticket/Display.html?id={$Ticket->id} >
382 {$Transaction->Content()}
386 Name => 'Admin Correspondence in HTML', # loc
387 Description => 'HTML admin correspondence template', # loc
388 Content => 'RT-Attach-Message: yes
389 Content-Type: text/html
391 Ticket URL: <a href="{RT->Config->Get("WebURL")}Ticket/Display.html?id={$Ticket->id}">{RT->Config->Get("WebURL")}Ticket/Display.html?id={$Ticket->id}</a>
394 {$Transaction->Content(Type => "text/html");}
398 Name => 'Correspondence', # loc
399 Description => 'Plain text correspondence template', # loc
400 Content => 'RT-Attach-Message: yes
402 {$Transaction->Content()}
406 Name => 'Correspondence in HTML', # loc
407 Description => 'HTML correspondence template', # loc
408 Content => 'RT-Attach-Message: yes
409 Content-Type: text/html
411 {$Transaction->Content( Type => "text/html")}
415 Name => 'Admin Comment', # loc
416 Description => 'Plain text admin comment template', # loc
418 'Subject: [Comment] {my $s=($Transaction->Subject||$Ticket->Subject||""); $s =~ s/\\[Comment\\]\\s*//g; $s =~ s/^Re:\\s*//i; $s;}
419 RT-Attach-Message: yes
422 {RT->Config->Get(\'WebURL\')}Ticket/Display.html?id={$Ticket->id}
423 This is a comment. It is not sent to the Requestor(s):
425 {$Transaction->Content()}
429 Name => 'Admin Comment in HTML', # loc
430 Description => 'HTML admin comment template', # loc
432 'Subject: [Comment] {my $s=($Transaction->Subject||$Ticket->Subject||""); $s =~ s/\\[Comment\\]\\s*//g; $s =~ s/^Re:\\s*//i; $s;}
433 RT-Attach-Message: yes
434 Content-Type: text/html
436 <p>This is a comment about <a href="{RT->Config->Get("WebURL")}Ticket/Display.html?id={$Ticket->id}">ticket {$Ticket->id}</a>. It is not sent to the Requestor(s):</p>
438 {$Transaction->Content(Type => "text/html")}
442 Name => 'Reminder', # loc
443 Description => 'Default reminder template', # loc
445 'Subject:{$Ticket->Subject} is due {$Ticket->DueObj->AsString}
447 This reminder is for ticket #{$Target = $Ticket->RefersTo->First->TargetObj;$Target->Id}.
449 {RT->Config->Get(\'WebURL\')}Ticket/Display.html?id={$Target->Id}
454 Name => 'Status Change', # loc
455 Description => 'Ticket status changed', # loc
456 Content => 'Subject: Status Changed to: {$Transaction->NewValue}
459 {RT->Config->Get(\'WebURL\')}Ticket/Display.html?id={$Ticket->id}
461 {$Transaction->Content()}
465 Name => 'Status Change in HTML', # loc
466 Description => 'HTML Ticket status changed', # loc
467 Content => 'Subject: Status Changed to: {$Transaction->NewValue}
468 Content-Type: text/html
470 <a href="{RT->Config->Get("WebURL")}Ticket/Display.html?id={$Ticket->id}">{RT->Config->Get("WebURL")}Ticket/Display.html?id={$Ticket->id}</a>
473 {$Transaction->Content(Type => "text/html")}
479 Name => 'Resolved', # loc
480 Description => 'Ticket Resolved', # loc
481 Content => 'Subject: Resolved: {$Ticket->Subject}
483 According to our records, your request has been resolved. If you have any
484 further questions or concerns, please respond to this message.
488 Name => 'Resolved in HTML', # loc
489 Description => 'HTML Ticket Resolved', # loc
490 Content => 'Subject: Resolved: {$Ticket->Subject}
491 Content-Type: text/html
493 <p>According to our records, your request has been resolved. If you have any further questions or concerns, please respond to this message.</p>
496 { Queue => '___Approvals',
497 Name => "New Pending Approval", # loc
499 "Notify Owners and AdminCcs of new items pending their approval", # loc
500 Content => 'Subject: New Pending Approval: {$Ticket->Subject}
504 There is a new item pending your approval: "{$Ticket->Subject()}",
505 a summary of which appears below.
507 Please visit {RT->Config->Get(\'WebURL\')}Approvals/Display.html?id={$Ticket->id}
508 to approve or reject this ticket, or {RT->Config->Get(\'WebURL\')}Approvals/ to
509 batch-process all your pending approvals.
511 -------------------------------------------------------------------------
512 {$Transaction->Content()}
515 { Queue => '___Approvals',
516 Name => "New Pending Approval in HTML", # loc
517 Description => "Notify Owners and AdminCcs of new items pending their approval", # loc
518 Content => 'Subject: New Pending Approval: {$Ticket->Subject}
519 Content-Type: text/html
523 <p>There is a new item pending your approval: <b>{$Ticket->Subject()}</b>,
524 a summary of which appears below.</p>
526 <p>Please <a href="{RT->Config->Get(\'WebURL\')}Approvals/Display.html?id={$Ticket->id}">approve
527 or reject this ticket</a>, or visit the <a href="{RT->Config->Get(\'WebURL\')}Approvals/">approvals
528 overview</a> to batch-process all your pending approvals.</p>
531 {$Transaction->Content()}
534 { Queue => '___Approvals',
535 Name => "Approval Passed", # loc
537 "Notify Requestor of their ticket has been approved by some approver", # loc
538 Content => 'Subject: Ticket Approved: {$Ticket->Subject}
542 Your ticket has been approved by { eval { $Approver->Name } }.
543 Other approvals may be pending.
545 Approver\'s notes: { $Notes }
548 { Queue => '___Approvals',
549 Name => "Approval Passed in HTML", # loc
551 "Notify Requestor of their ticket has been approved by some approver", # loc
552 Content => 'Subject: Ticket Approved: {$Ticket->Subject}
553 Content-Type: text/html
557 <p>Your ticket has been approved by <b>{ eval { $Approver->Name } }</b>.
558 Other approvals may be pending.</p>
560 <p>Approver\'s notes:</p>
561 <blockquote>{ $Notes }</blockquote>
564 { Queue => '___Approvals',
565 Name => "All Approvals Passed", # loc
567 "Notify Requestor of their ticket has been approved by all approvers", # loc
568 Content => 'Subject: Ticket Approved: {$Ticket->Subject}
572 Your ticket has been approved by { eval { $Approver->Name } }.
573 Its Owner may now start to act on it.
575 Approver\'s notes: { $Notes }
578 { Queue => '___Approvals',
579 Name => "All Approvals Passed in HTML", # loc
581 "Notify Requestor of their ticket has been approved by all approvers", # loc
582 Content => 'Subject: Ticket Approved: {$Ticket->Subject}
583 Content-Type: text/html
587 <p>Your ticket has been approved by <b>{ eval { $Approver->Name } }</b>.
588 Its Owner may now start to act on it.</p>
590 <p>Approver\'s notes:</p>
591 <blockquote>{ $Notes }</blockquote>
594 { Queue => '___Approvals',
595 Name => "Approval Rejected", # loc
597 "Notify Owner of their rejected ticket", # loc
598 Content => 'Subject: Ticket Rejected: {$Ticket->Subject}
602 Your ticket has been rejected by { eval { $Approver->Name } }.
604 Approver\'s notes: { $Notes }
607 { Queue => '___Approvals',
608 Name => "Approval Rejected in HTML", # loc
610 "Notify Owner of their rejected ticket", # loc
611 Content => 'Subject: Ticket Rejected: {$Ticket->Subject}
612 Content-Type: text/html
616 <p>Your ticket has been rejected by <b>{ eval { $Approver->Name } }</b>.</p>
618 <p>Approver\'s notes:</p>
619 <blockquote>{ $Notes }</blockquote>
622 { Queue => '___Approvals',
623 Name => "Approval Ready for Owner", # loc
625 "Notify Owner of their ticket has been approved and is ready to be acted on", # loc
626 Content => 'Subject: Ticket Approved: {$Ticket->Subject}
630 The ticket has been approved, you may now start to act on it.
634 { Queue => '___Approvals',
635 Name => "Approval Ready for Owner in HTML", # loc
637 "Notify Owner of their ticket has been approved and is ready to be acted on", # loc
638 Content => 'Subject: Ticket Approved: {$Ticket->Subject}
639 Content-Type: text/html
643 <p>The ticket has been approved, you may now start to act on it.</p>
648 Name => "Forward", # loc
649 Description => "Forwarded message", # loc
652 { $ForwardTransaction->Content =~ /\S/ ? $ForwardTransaction->Content : "This is a forward of transaction #".$Transaction->id." of ticket #". $Ticket->id }
656 Name => "Forward Ticket", # loc
657 Description => "Forwarded ticket message", # loc
660 { $ForwardTransaction->Content =~ /\S/ ? $ForwardTransaction->Content : "This is a forward of ticket #". $Ticket->id }
664 Name => "Error: unencrypted message", # loc
666 "Inform user that their unencrypted mail has been rejected", # loc
667 Content => q{Subject: RT requires that all incoming mail be encrypted
669 You received this message because RT received mail from you that was not encrypted. As such, it has been rejected.
673 Name => "Error: public key", # loc
675 "Inform user that he has problems with public key and couldn't recieve encrypted content", # loc
676 Content => q{Subject: We have no your public key or it's wrong
678 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.
682 Name => "Error to RT owner: public key", # loc
684 "Inform RT owner that user(s) have problems with public keys", # loc
685 Content => q{Subject: Some users have problems with public keys
687 You received this message as RT has problems with public keys of the following user:
689 foreach my $e ( @BadRecipients ) {
690 $OUT .= "* ". $e->{'Message'} ."\n";
695 Name => "Error: no private key", # loc
697 "Inform user that we received an encrypted email and we have no private keys to decrypt", # loc
698 Content => q{Subject: we received message we cannot decrypt
700 You sent an encrypted message with subject '{ $Message->head->get('Subject') }',
701 but we have no private key it's encrypted to.
703 Please, check that you encrypt messages with correct keys
704 or contact the system administrator.}
707 Name => "Error: bad encrypted data", # loc
709 "Inform user that a message he sent has invalid encryption data", # loc
710 Content => q{Subject: We received a message we cannot handle
712 You sent us a message that we cannot handle due to corrupted signature or encrypted block. we get the following error(s):
713 { foreach my $msg ( @Messages ) {
719 Name => "PasswordChange", # loc
721 "Inform user that his password has been reset", # loc
722 Content => q{Subject: [{RT->Config->Get('rtname')}] Password reset
726 Someone at {$ENV{'REMOTE_ADDR'}} requested a password reset for you on {RT->Config->Get('WebURL')}
728 Your new password is:
734 Name => 'Email Digest', # loc
735 Description => 'Email template for periodic notification digests', # loc
736 Content => q[Subject: RT Email Digest
744 Name => "Error: Missing dashboard", # loc
746 "Inform user that a dashboard he subscribed to is missing", # loc
747 Content => q{Subject: [{RT->Config->Get('rtname')}] Missing dashboard!
751 You are subscribed to a dashboard that is currently missing. Most likely, the dashboard was deleted.
753 RT will remove this subscription as it is no longer useful. Here's the information RT had about your subscription:
755 DashboardID: { $SubscriptionObj->SubValue('DashboardId') }
756 Frequency: { $SubscriptionObj->SubValue('Frequency') }
757 Hour: { $SubscriptionObj->SubValue('Hour') }
759 $SubscriptionObj->SubValue('Frequency') eq 'weekly'
760 ? "Day of week: " . $SubscriptionObj->SubValue('Dow')
761 : $SubscriptionObj->SubValue('Frequency') eq 'monthly'
762 ? "Day of month: " . $SubscriptionObj->SubValue('Dom')
768 Name => 'Custom Field Transaction',
769 Description => 'Custom field value changed',
770 Content => q[Subject: {$Transaction->BriefDescription()}
772 {RT->Config->Get('WebURL')}Ticket/Display.html?id={$Ticket->id}
774 {$Transaction->Content()}
781 { Description => 'On Comment Notify AdminCcs as Comment',
782 ScripCondition => 'On Comment',
783 ScripAction => 'Notify AdminCcs As Comment',
784 Template => 'Admin Comment in HTML' },
785 { Description => 'On Comment Notify Other Recipients as Comment',
786 ScripCondition => 'On Comment',
787 ScripAction => 'Notify Other Recipients As Comment',
788 Template => 'Correspondence in HTML' },
789 { Description => 'On Correspond Notify Owner and AdminCcs',
790 ScripCondition => 'On Correspond',
791 ScripAction => 'Notify Owner and AdminCcs',
792 Template => 'Admin Correspondence in HTML' },
793 # { Description => 'On Correspond Notify Other Recipients',
794 # ScripCondition => 'On Correspond',
795 # ScripAction => 'Notify Other Recipients',
796 # Template => 'Correspondence in HTML' },
797 # { Description => 'On Correspond Notify Requestors and Ccs',
798 # ScripCondition => 'On Correspond',
799 # ScripAction => 'Notify Requestors And Ccs',
800 # Template => 'Correspondence in HTML' },
801 { Description => 'On Correspond Open Tickets',
802 ScripCondition => 'On Correspond',
803 ScripAction => 'Open Tickets',
804 Template => 'Blank' },
805 { Description => 'On Create Autoreply To Requestors',
806 ScripCondition => 'On Create',
807 ScripAction => 'AutoReply To Requestors',
808 Template => 'AutoReply in HTML' },
809 { Description => 'On Create Notify Owner and AdminCcs',
810 ScripCondition => 'On Create',
811 ScripAction => 'Notify Owner and AdminCcs',
812 Template => 'Transaction in HTML' },
813 { Description => 'On Create Notify Ccs',
814 ScripCondition => 'On Create',
815 ScripAction => 'Notify Ccs',
816 Template => 'Correspondence in HTML' },
817 { Description => 'On Create Notify Other Recipients',
818 ScripCondition => 'On Create',
819 ScripAction => 'Notify Other Recipients',
820 Template => 'Correspondence in HTML' },
821 { Description => 'On Owner Change Notify Owner',
822 ScripCondition => 'On Owner Change',
823 ScripAction => 'Notify Owner',
824 Template => 'Transaction in HTML' },
825 { Description => 'On Resolve Notify Requestors',
826 ScripCondition => 'On Resolve',
827 ScripAction => 'Notify Requestors',
828 Template => 'Resolved in HTML' },
829 { Description => "On transaction, add any tags in the transaction's subject to the ticket's subject",
830 ScripCondition => 'On Transaction',
831 ScripAction => 'Extract Subject Tag',
832 Template => 'Blank' },
833 { Description => 'On Forward Transaction Send forwarded message',
834 ScripCondition => 'On Forward Transaction',
835 ScripAction => 'Send Forward',
836 Template => 'Forward' },
837 { Description => 'On Forward Ticket Send forwarded message',
838 ScripCondition => 'On Forward Ticket',
839 ScripAction => 'Send Forward',
840 Template => 'Forward Ticket' },
844 { UserId => 'root', # - principalid
845 Right => 'SuperUser', },
847 { GroupDomain => 'SystemInternal',
848 GroupType => 'privileged',
849 Right => 'ShowApprovalsTab', },
853 # Predefined searches
856 { Name => 'Search - My Tickets',
857 Description => '[_1] highest priority tickets I own', # loc
859 { Format => q{'<a href="__WebPath__/Ticket/Display.html?id=__id__">__id__</a>/TITLE:#',}
860 . q{'<a href="__WebPath__/Ticket/Display.html?id=__id__">__Subject__</a>/TITLE:Subject',}
861 . q{Priority, QueueName, ExtendedStatus},
862 Query => " Owner = '__CurrentUser__' AND ( Status = 'new' OR Status = 'open')",
863 OrderBy => 'Priority',
867 { Name => 'Search - Unowned Tickets',
868 Description => '[_1] newest unowned tickets', # loc
871 { Format => q{'<a href="__WebPath__/Ticket/Display.html?id=__id__">__id__</a>/TITLE:#',}
872 . q{'<a href="__WebPath__/Ticket/Display.html?id=__id__">__Subject__</a>/TITLE:Subject',}
873 . q{QueueName, ExtendedStatus, CreatedRelative, }
874 . q{'<A HREF="__WebPath__/Ticket/Display.html?Action=Take&id=__id__">__loc(Take)__</a>/TITLE:NBSP'},
875 Query => " Owner = 'Nobody' AND ( Status = 'new' OR Status = 'open')",
876 OrderBy => 'Created',
880 { Name => 'Search - Bookmarked Tickets',
881 Description => 'Bookmarked Tickets', #loc
883 { Format => q{'<a href="__WebPath__/Ticket/Display.html?id=__id__">__id__</a>/TITLE:#',}
884 . q{'<a href="__WebPath__/Ticket/Display.html?id=__id__">__Subject__</a>/TITLE:Subject',}
885 . q{Priority, QueueName, ExtendedStatus, Bookmark},
886 Query => "id = '__Bookmarked__'",
887 OrderBy => 'LastUpdated',
891 Name => 'HomepageSettings',
892 Description => 'HomepageSettings',
894 'body' => # loc_left_pair
898 name => 'My Tickets', # loc
902 name => 'Unowned Tickets' # loc
906 name => 'Bookmarked Tickets' # loc
910 name => 'QuickCreate' # loc
913 'sidebar' => # loc_left_pair
917 name => 'MyReminders' # loc
921 name => 'Quicksearch' # loc
925 name => 'Dashboards' # loc
929 name => 'RefreshHomepage' # loc
937 # Obsolete/erroneous scrips
939 # $Delete_Scrips{conditionname}{actionname}{templatename}
940 # exists, and the scrip was created by the system user, it
941 # will be deleted on upgrade. Lowercase all the names here.
945 'notify requestors and ccs' => { 'correspondence' => 1 },
946 'notify other recipients' => { 'correspondence' => 1 },
948 # superseded by "notify owner and adminccs"
949 'notify adminccs' => { 'admin correspondence' => 1 },
950 # the new way, but doesn't work right vs. "open tickets"
951 'open inactive tickets' => { 'blank' => 1 },
955 # superseded by "notify owner and adminccs"
956 'notify adminccs' => { 'transaction' => 1 },
962 push @ScripActions, (
964 { Name => 'Extract Custom Field Values', # loc
965 Description => 'extract cf-values out of a message', # loc
966 ExecModule => 'ExtractCustomFieldValues' },
968 { Name => 'Extract Custom Field Values With Code in Template', # loc
969 Description => 'extract cf-values out of a message with a Text::Template template', # loc
970 ExecModule => 'ExtractCustomFieldValuesWithCodeInTemplate' }
976 Name => 'CustomFieldScannerExample', # loc
977 Description => 'Example Template for ExtractCustomFieldValues', # loc
978 Content => <<'EOTEXT'
980 # CF Name | Header name or "Body" | MatchString(re) | Postcmd | Options
982 #### Allowed Options:
984 # q - (quiet) Don't record a transaction for adding the custom field
986 # * - (wildcard) The MatchString regex should contain _two_
987 # capturing groups, the first of which is the CF name,
988 # the second of which is the value. If this option is
989 # given, the <cf-name> field is ignored.
993 # 1. Put the content of the "X-MI-Test" header into the "testcf"
995 # testcf|X-MI-Test|.*
997 # 2. Scan the body for Host:name and put name into the "bodycf" custom
999 # bodycf|Body|Host:\s*(\w+)
1001 # 3. Scan the "X-MI-IP" header for an IP-Adresse and get the hostname
1002 # by reverse-resolving it:
1003 # Hostname|X-MI-IP|\d+\.\d+\.\d+\.\d+|use Socket; ($value) = gethostbyaddr(inet_aton($value),AF_INET);
1005 # 4. scan the "CC" header for an many email addresses, and add them to
1006 # a custom field named "parsedCCs". If "parsedCCs" is a multivalue
1007 # CF, then this should yield separate values for all email adress
1009 # parsedCCs|CC|.*|$value =~ s/^\s+//; $value =~ s/\s+$//;
1011 # 5. Looks for an "Email:" field in the body of the email, then loads
1012 # up that user and makes them privileged The blank first field
1013 # means the automatic CustomField setting is not invoked.
1014 # |Body|Email:\s*(.+)$|my $u = RT::User->new($RT::SystemUser); $u->LoadByEmail($value); $u->SetPrivileged(1)|
1016 # 6. Looks for any text of the form "Set CF Name: Value" in the body,
1017 # and sets the CF named "CF Name" to the given value, which may be
1018 # multi-line. The '*' option controls the wildcard nature of this
1021 # !Body!^Set ([^\n:]*?):\s*((?s).*?)(?:\Z|\n\Z|\n\n)!!*
1023 # 7. Looks for the regex anywhere in the headers and stores the match
1024 # in the AllHeaderSearch CF
1025 # AllHeaderSearch|Headers|Site:\s*(\w+)
1027 # 8. If you need to dynamically build your matching, and want to trigger on headers and body
1028 # and invode some arbitrary code like example 5
1031 # my $action = 'use My::Site; My::Site::SetSiteID( Ticket => $self->TicketObj, Site => $_ );';
1033 # for my $regex (My::Site::ValidRegexps) {
1034 # for my $from ('headers', 'body') {
1035 # $OUT .= join '~~',