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' },
93 # deprecated? now default create scrips use it in 4.2
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 => 'AutoreplyOrCorrespondence', # loc
323 Description => 'Plaintext AutoreplyOrCorrespondence template', # loc
326 my $creator_name = $Ticket->CreatorObj->Name;
327 my $requestors = $Ticket->Requestors->UserMembersObj;
328 my ( $c_requestor, $r_count ) = ( 0, 0 );
329 while ( my $r = $requestors->Next() ) {
330 if ( $r->Name eq $creator_name ) {
337 my $template = new RT::Template($RT::SystemUser);
340 #if the creator is not a requestor or
341 #there is more than one requestor ( who's not the creator )
342 #use the Correspondence template
343 if ( ! $c_requestor || $r_count ) {
344 $template_name = 'Correspondence';
347 #otherwise use the Autoreply template
348 $template_name = 'Autoreply';
351 #Load the Queue Template
352 $template->LoadQueueTemplate(
353 Queue => $Ticket->Queue,
354 Name => $template_name,
356 #if there's no Queue Template attempt to find a Global one.
357 unless ( $template->id ) {
358 $template->LoadGlobalTemplate( $template_name );
359 unless ( $template->id ) {
360 $RT::Logger->error("Could not load template : $template_name")
363 #Process embedded fields & expressions of true templates;
364 #note that we can only meaningfully use the body
365 my($ret, $msg) = $template->Parse(
366 TicketObj => $Ticket,
367 TransactionObj => $Transaction,
369 $ret ? $template->MIMEObj->stringify : $msg;
374 Name => 'AutoreplyOrCorrespondence in HTML', # loc
375 Description => 'HTML AutoreplyOrCorrespondence template', # loc
378 my $creator_name = $Ticket->CreatorObj->Name;
379 my $requestors = $Ticket->Requestors->UserMembersObj;
380 my ( $c_requestor, $r_count ) = ( 0, 0 );
381 while ( my $r = $requestors->Next() ) {
382 if ( $r->Name eq $creator_name ) {
389 my $template = new RT::Template($RT::SystemUser);
392 #if the creator is not a requestor or
393 #there is more than one requestor ( who's not the creator )
394 #use the Correspondence template
395 if ( ! $c_requestor || $r_count ) {
396 $template_name = 'Correspondence in HTML';
399 #otherwise use the Autoreply in HTML template
400 $template_name = 'Autoreply in HTML';
403 #Load the Queue Template
404 $template->LoadQueueTemplate(
405 Queue => $Ticket->Queue,
406 Name => $template_name,
408 #if there's no Queue Template attempt to find a Global one.
409 unless ( $template->id ) {
410 $template->LoadGlobalTemplate( $template_name );
411 unless ( $template->id ) {
412 $RT::Logger->error("Could not load template : $template_name")
415 #Process embedded fields & expressions of true templates;
416 #note that we can only meaningfully use the body
417 my($ret, $msg) = $template->Parse(
418 TicketObj => $Ticket,
419 TransactionObj => $Transaction,
421 $ret ? $template->MIMEObj->stringify : $msg;
426 Name => 'Transaction', # loc
427 Description => 'Plain text transaction template', # loc
428 Content => 'RT-Attach-Message: yes
431 {$Transaction->CreatedAsString}: Request {$Ticket->id} was acted upon.
432 Transaction: {$Transaction->Description}
433 Queue: {$Ticket->QueueObj->Name}
434 Subject: {$Transaction->Subject || $Ticket->Subject || "(No subject given)"}
435 Owner: {$Ticket->OwnerObj->Name}
436 Requestors: {$Ticket->RequestorAddresses}
437 Status: {$Ticket->Status}
438 Ticket <URL: {RT->Config->Get(\'WebURL\')}Ticket/Display.html?id={$Ticket->id} >
441 {$Transaction->Content()}
445 Name => 'Transaction in HTML', # loc
446 Description => 'HTML transaction template', # loc
447 Content => 'RT-Attach-Message: yes
448 Content-Type: text/html
450 <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>
453 <tr><td align="right"><b>Transaction:</b></td><td>{$Transaction->Description}</td></tr>
454 <tr><td align="right"><b>Queue:</b></td><td>{$Ticket->QueueObj->Name}</td></tr>
455 <tr><td align="right"><b>Subject:</b></td><td>{$Transaction->Subject || $Ticket->Subject || "(No subject given)"} </td></tr>
456 <tr><td align="right"><b>Owner:</b></td><td>{$Ticket->OwnerObj->Name}</td></tr>
457 <tr><td align="right"><b>Requestors:</b></td><td>{$Ticket->RequestorAddresses}</td></tr>
458 <tr><td align="right"><b>Status:</b></td><td>{$Ticket->Status}</td></tr>
459 <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>
463 {$Transaction->Content( Type => "text/html")}
466 # Shadow the global templates of the same name to suppress duplicate
467 # notifications until rules is ripped out.
468 { Queue => "___Approvals",
469 Name => "Transaction in HTML",
472 { Queue => "___Approvals",
473 Name => "Transaction",
479 Name => 'Admin Correspondence', # loc
480 Description => 'Plain text admin correspondence template', # loc
481 Content => 'RT-Attach-Message: yes
484 <URL: {RT->Config->Get(\'WebURL\')}Ticket/Display.html?id={$Ticket->id} >
486 {$Transaction->Content()}
490 Name => 'Admin Correspondence in HTML', # loc
491 Description => 'HTML admin correspondence template', # loc
492 Content => 'RT-Attach-Message: yes
493 Content-Type: text/html
495 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>
498 {$Transaction->Content(Type => "text/html");}
502 Name => 'Correspondence', # loc
503 Description => 'Plain text correspondence template', # loc
504 Content => 'RT-Attach-Message: yes
506 {$Transaction->Content()}
510 Name => 'Correspondence in HTML', # loc
511 Description => 'HTML correspondence template', # loc
512 Content => 'RT-Attach-Message: yes
513 Content-Type: text/html
515 {$Transaction->Content( Type => "text/html")}
519 Name => 'Admin Comment', # loc
520 Description => 'Plain text admin comment template', # loc
522 'Subject: [Comment] {my $s=($Transaction->Subject||$Ticket->Subject||""); $s =~ s/\\[Comment\\]\\s*//g; $s =~ s/^Re:\\s*//i; $s;}
523 RT-Attach-Message: yes
526 {RT->Config->Get(\'WebURL\')}Ticket/Display.html?id={$Ticket->id}
527 This is a comment. It is not sent to the Requestor(s):
529 {$Transaction->Content()}
533 Name => 'Admin Comment in HTML', # loc
534 Description => 'HTML admin comment template', # loc
536 'Subject: [Comment] {my $s=($Transaction->Subject||$Ticket->Subject||""); $s =~ s/\\[Comment\\]\\s*//g; $s =~ s/^Re:\\s*//i; $s;}
537 RT-Attach-Message: yes
538 Content-Type: text/html
540 <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>
542 {$Transaction->Content(Type => "text/html")}
546 Name => 'Reminder', # loc
547 Description => 'Default reminder template', # loc
549 'Subject:{$Ticket->Subject} is due {$Ticket->DueObj->AsString}
551 This reminder is for ticket #{$Target = $Ticket->RefersTo->First->TargetObj;$Target->Id}.
553 {RT->Config->Get(\'WebURL\')}Ticket/Display.html?id={$Target->Id}
558 Name => 'Status Change', # loc
559 Description => 'Ticket status changed', # loc
560 Content => 'Subject: Status Changed to: {$Transaction->NewValue}
563 {RT->Config->Get(\'WebURL\')}Ticket/Display.html?id={$Ticket->id}
565 {$Transaction->Content()}
569 Name => 'Status Change in HTML', # loc
570 Description => 'HTML Ticket status changed', # loc
571 Content => 'Subject: Status Changed to: {$Transaction->NewValue}
572 Content-Type: text/html
574 <a href="{RT->Config->Get("WebURL")}Ticket/Display.html?id={$Ticket->id}">{RT->Config->Get("WebURL")}Ticket/Display.html?id={$Ticket->id}</a>
577 {$Transaction->Content(Type => "text/html")}
583 Name => 'Resolved', # loc
584 Description => 'Ticket Resolved', # loc
585 Content => 'Subject: Resolved: {$Ticket->Subject}
587 According to our records, your request has been resolved. If you have any
588 further questions or concerns, please respond to this message.
592 Name => 'Resolved in HTML', # loc
593 Description => 'HTML Ticket Resolved', # loc
594 Content => 'Subject: Resolved: {$Ticket->Subject}
595 Content-Type: text/html
597 <p>According to our records, your request has been resolved. If you have any further questions or concerns, please respond to this message.</p>
600 { Queue => '___Approvals',
601 Name => "New Pending Approval", # loc
603 "Notify Owners and AdminCcs of new items pending their approval", # loc
604 Content => 'Subject: New Pending Approval: {$Ticket->Subject}
608 There is a new item pending your approval: "{$Ticket->Subject()}",
609 a summary of which appears below.
611 Please visit {RT->Config->Get(\'WebURL\')}Approvals/Display.html?id={$Ticket->id}
612 to approve or reject this ticket, or {RT->Config->Get(\'WebURL\')}Approvals/ to
613 batch-process all your pending approvals.
615 -------------------------------------------------------------------------
616 {$Transaction->Content()}
619 { Queue => '___Approvals',
620 Name => "New Pending Approval in HTML", # loc
621 Description => "Notify Owners and AdminCcs of new items pending their approval", # loc
622 Content => 'Subject: New Pending Approval: {$Ticket->Subject}
623 Content-Type: text/html
627 <p>There is a new item pending your approval: <b>{$Ticket->Subject()}</b>,
628 a summary of which appears below.</p>
630 <p>Please <a href="{RT->Config->Get(\'WebURL\')}Approvals/Display.html?id={$Ticket->id}">approve
631 or reject this ticket</a>, or visit the <a href="{RT->Config->Get(\'WebURL\')}Approvals/">approvals
632 overview</a> to batch-process all your pending approvals.</p>
635 {$Transaction->Content()}
638 { Queue => '___Approvals',
639 Name => "Approval Passed", # loc
641 "Notify Requestor of their ticket has been approved by some approver", # loc
642 Content => 'Subject: Ticket Approved: {$Ticket->Subject}
646 Your ticket has been approved by { eval { $Approver->Name } }.
647 Other approvals may be pending.
649 Approver\'s notes: { $Notes }
652 { Queue => '___Approvals',
653 Name => "Approval Passed in HTML", # loc
655 "Notify Requestor of their ticket has been approved by some approver", # loc
656 Content => 'Subject: Ticket Approved: {$Ticket->Subject}
657 Content-Type: text/html
661 <p>Your ticket has been approved by <b>{ eval { $Approver->Name } }</b>.
662 Other approvals may be pending.</p>
664 <p>Approver\'s notes:</p>
665 <blockquote>{ $Notes }</blockquote>
668 { Queue => '___Approvals',
669 Name => "All Approvals Passed", # loc
671 "Notify Requestor of their ticket has been approved by all approvers", # loc
672 Content => 'Subject: Ticket Approved: {$Ticket->Subject}
676 Your ticket has been approved by { eval { $Approver->Name } }.
677 Its Owner may now start to act on it.
679 Approver\'s notes: { $Notes }
682 { Queue => '___Approvals',
683 Name => "All Approvals Passed in HTML", # loc
685 "Notify Requestor of their ticket has been approved by all approvers", # loc
686 Content => 'Subject: Ticket Approved: {$Ticket->Subject}
687 Content-Type: text/html
691 <p>Your ticket has been approved by <b>{ eval { $Approver->Name } }</b>.
692 Its Owner may now start to act on it.</p>
694 <p>Approver\'s notes:</p>
695 <blockquote>{ $Notes }</blockquote>
698 { Queue => '___Approvals',
699 Name => "Approval Rejected", # loc
701 "Notify Owner of their rejected ticket", # loc
702 Content => 'Subject: Ticket Rejected: {$Ticket->Subject}
706 Your ticket has been rejected by { eval { $Approver->Name } }.
708 Approver\'s notes: { $Notes }
711 { Queue => '___Approvals',
712 Name => "Approval Rejected in HTML", # loc
714 "Notify Owner of their rejected ticket", # loc
715 Content => 'Subject: Ticket Rejected: {$Ticket->Subject}
716 Content-Type: text/html
720 <p>Your ticket has been rejected by <b>{ eval { $Approver->Name } }</b>.</p>
722 <p>Approver\'s notes:</p>
723 <blockquote>{ $Notes }</blockquote>
726 { Queue => '___Approvals',
727 Name => "Approval Ready for Owner", # loc
729 "Notify Owner of their ticket has been approved and is ready to be acted on", # loc
730 Content => 'Subject: Ticket Approved: {$Ticket->Subject}
734 The ticket has been approved, you may now start to act on it.
738 { Queue => '___Approvals',
739 Name => "Approval Ready for Owner in HTML", # loc
741 "Notify Owner of their ticket has been approved and is ready to be acted on", # loc
742 Content => 'Subject: Ticket Approved: {$Ticket->Subject}
743 Content-Type: text/html
747 <p>The ticket has been approved, you may now start to act on it.</p>
752 Name => "Forward", # loc
753 Description => "Forwarded message", # loc
756 { $ForwardTransaction->Content =~ /\S/ ? $ForwardTransaction->Content : "This is a forward of transaction #".$Transaction->id." of ticket #". $Ticket->id }
760 Name => "Forward Ticket", # loc
761 Description => "Forwarded ticket message", # loc
764 { $ForwardTransaction->Content =~ /\S/ ? $ForwardTransaction->Content : "This is a forward of ticket #". $Ticket->id }
768 Name => "Error: unencrypted message", # loc
770 "Inform user that their unencrypted mail has been rejected", # loc
771 Content => q{Subject: RT requires that all incoming mail be encrypted
773 You received this message because RT received mail from you that was not encrypted. As such, it has been rejected.
777 Name => "Error: public key", # loc
779 "Inform user that he has problems with public key and couldn't recieve encrypted content", # loc
780 Content => q{Subject: We have no your public key or it's wrong
782 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.
786 Name => "Error to RT owner: public key", # loc
788 "Inform RT owner that user(s) have problems with public keys", # loc
789 Content => q{Subject: Some users have problems with public keys
791 You received this message as RT has problems with public keys of the following user:
793 foreach my $e ( @BadRecipients ) {
794 $OUT .= "* ". $e->{'Message'} ."\n";
799 Name => "Error: no private key", # loc
801 "Inform user that we received an encrypted email and we have no private keys to decrypt", # loc
802 Content => q{Subject: we received message we cannot decrypt
804 You sent an encrypted message with subject '{ $Message->head->get('Subject') }',
805 but we have no private key it's encrypted to.
807 Please, check that you encrypt messages with correct keys
808 or contact the system administrator.}
811 Name => "Error: bad encrypted data", # loc
813 "Inform user that a message he sent has invalid encryption data", # loc
814 Content => q{Subject: We received a message we cannot handle
816 You sent us a message that we cannot handle due to corrupted signature or encrypted block. we get the following error(s):
817 { foreach my $msg ( @Messages ) {
823 Name => "PasswordChange", # loc
825 "Inform user that his password has been reset", # loc
826 Content => q{Subject: [{RT->Config->Get('rtname')}] Password reset
830 Someone at {$ENV{'REMOTE_ADDR'}} requested a password reset for you on {RT->Config->Get('WebURL')}
832 Your new password is:
838 Name => 'Email Digest', # loc
839 Description => 'Email template for periodic notification digests', # loc
840 Content => q[Subject: RT Email Digest
848 Name => "Error: Missing dashboard", # loc
850 "Inform user that a dashboard he subscribed to is missing", # loc
851 Content => q{Subject: [{RT->Config->Get('rtname')}] Missing dashboard!
855 You are subscribed to a dashboard that is currently missing. Most likely, the dashboard was deleted.
857 RT will remove this subscription as it is no longer useful. Here's the information RT had about your subscription:
859 DashboardID: { $SubscriptionObj->SubValue('DashboardId') }
860 Frequency: { $SubscriptionObj->SubValue('Frequency') }
861 Hour: { $SubscriptionObj->SubValue('Hour') }
863 $SubscriptionObj->SubValue('Frequency') eq 'weekly'
864 ? "Day of week: " . $SubscriptionObj->SubValue('Dow')
865 : $SubscriptionObj->SubValue('Frequency') eq 'monthly'
866 ? "Day of month: " . $SubscriptionObj->SubValue('Dom')
872 Name => 'Custom Field Transaction',
873 Description => 'Custom field value changed',
874 Content => q[Subject: {$Transaction->BriefDescription()}
876 {RT->Config->Get('WebURL')}Ticket/Display.html?id={$Ticket->id}
878 {$Transaction->Content()}
885 { Description => 'On Comment Notify AdminCcs as Comment',
886 ScripCondition => 'On Comment',
887 ScripAction => 'Notify AdminCcs As Comment',
888 Template => 'Admin Comment in HTML' },
889 { Description => 'On Comment Notify Other Recipients as Comment',
890 ScripCondition => 'On Comment',
891 ScripAction => 'Notify Other Recipients As Comment',
892 Template => 'Correspondence in HTML' },
893 { Description => 'On Correspond Notify Owner and AdminCcs',
894 ScripCondition => 'On Correspond',
895 ScripAction => 'Notify Owner and AdminCcs',
896 Template => 'Admin Correspondence in HTML' },
897 # { Description => 'On Correspond Notify Other Recipients',
898 # ScripCondition => 'On Correspond',
899 # ScripAction => 'Notify Other Recipients',
900 # Template => 'Correspondence in HTML' },
901 # { Description => 'On Correspond Notify Requestors and Ccs',
902 # ScripCondition => 'On Correspond',
903 # ScripAction => 'Notify Requestors And Ccs',
904 # Template => 'Correspondence in HTML' },
905 { Description => 'On Correspond Notify Requestors, Ccs, and Other Recipients',
906 ScripCondition => 'On Correspond',
907 ScripAction => 'Notify Requestors, Ccs, and Other Recipients',
908 Template => 'Correspondence', },
910 { Description => 'On Correspond Open Tickets',
911 ScripCondition => 'On Correspond',
912 ScripAction => 'Open Tickets',
913 Template => 'Blank' },
914 { Description => 'On Create Autoreply To Requestors',
915 ScripCondition => 'On Create',
916 ScripAction => 'AutoReply To Requestors',
917 Template => 'AutoReply in HTML' },
918 { Description => 'On Create Notify Owner and AdminCcs',
919 ScripCondition => 'On Create',
920 ScripAction => 'Notify Owner and AdminCcs',
921 Template => 'Transaction in HTML' },
922 { Description => 'On Create Notify Ccs',
923 ScripCondition => 'On Create',
924 ScripAction => 'Notify Ccs',
925 Template => 'Correspondence in HTML' },
926 { Description => 'On Create Notify Other Recipients',
927 ScripCondition => 'On Create',
928 ScripAction => 'Notify Other Recipients',
929 Template => 'Correspondence in HTML' },
930 { Description => 'On Owner Change Notify Owner',
931 ScripCondition => 'On Owner Change',
932 ScripAction => 'Notify Owner',
933 Template => 'Transaction in HTML' },
934 { Description => 'On Resolve Notify Requestors',
935 ScripCondition => 'On Resolve',
936 ScripAction => 'Notify Requestors',
937 Template => 'Resolved in HTML' },
938 { Description => "On transaction, add any tags in the transaction's subject to the ticket's subject",
939 ScripCondition => 'On Transaction',
940 ScripAction => 'Extract Subject Tag',
941 Template => 'Blank' },
942 { Description => 'On Forward Transaction Send forwarded message',
943 ScripCondition => 'On Forward Transaction',
944 ScripAction => 'Send Forward',
945 Template => 'Forward' },
946 { Description => 'On Forward Ticket Send forwarded message',
947 ScripCondition => 'On Forward Ticket',
948 ScripAction => 'Send Forward',
949 Template => 'Forward Ticket' },
950 { Description => 'On Correspond, cancel future resolve',
951 ScripCondition => 'On Correspond',
952 ScripAction => 'Cancel Scheduled Resolve',
953 Template => 'Blank' },
957 { UserId => 'root', # - principalid
958 Right => 'SuperUser', },
960 { GroupDomain => 'SystemInternal',
961 GroupType => 'privileged',
962 Right => 'ShowApprovalsTab', },
966 # Predefined searches
969 { Name => 'Search - My Tickets',
970 Description => '[_1] highest priority tickets I own', # loc
972 { Format => q{'<a href="__WebPath__/Ticket/Display.html?id=__id__">__id__</a>/TITLE:#',}
973 . q{'<a href="__WebPath__/Ticket/Display.html?id=__id__">__Subject__</a>/TITLE:Subject',}
974 . q{Priority, QueueName, ExtendedStatus},
975 Query => " Owner = '__CurrentUser__' AND ( Status = 'new' OR Status = 'open')",
976 OrderBy => 'Priority',
980 { Name => 'Search - Unowned Tickets',
981 Description => '[_1] newest unowned tickets', # loc
984 { Format => q{'<a href="__WebPath__/Ticket/Display.html?id=__id__">__id__</a>/TITLE:#',}
985 . q{'<a href="__WebPath__/Ticket/Display.html?id=__id__">__Subject__</a>/TITLE:Subject',}
986 . q{QueueName, ExtendedStatus, CreatedRelative, }
987 . q{'<A HREF="__WebPath__/Ticket/Display.html?Action=Take&id=__id__">__loc(Take)__</a>/TITLE:NBSP'},
988 Query => " Owner = 'Nobody' AND ( Status = 'new' OR Status = 'open')",
989 OrderBy => 'Created',
993 { Name => 'Search - Bookmarked Tickets',
994 Description => 'Bookmarked Tickets', #loc
996 { Format => q{'<a href="__WebPath__/Ticket/Display.html?id=__id__">__id__</a>/TITLE:#',}
997 . q{'<a href="__WebPath__/Ticket/Display.html?id=__id__">__Subject__</a>/TITLE:Subject',}
998 . q{Priority, QueueName, ExtendedStatus, Bookmark},
999 Query => "id = '__Bookmarked__'",
1000 OrderBy => 'LastUpdated',
1004 Name => 'HomepageSettings',
1005 Description => 'HomepageSettings',
1007 'body' => # loc_left_pair
1011 name => 'My Tickets', # loc
1015 name => 'Unowned Tickets' # loc
1019 name => 'Bookmarked Tickets' # loc
1022 type => 'component',
1023 name => 'QuickCreate' # loc
1026 'sidebar' => # loc_left_pair
1029 type => 'component',
1030 name => 'MyReminders' # loc
1033 type => 'component',
1034 name => 'Quicksearch' # loc
1037 type => 'component',
1038 name => 'Dashboards' # loc
1041 type => 'component',
1042 name => 'RefreshHomepage' # loc
1050 # Obsolete/erroneous scrips
1052 # $Delete_Scrips{conditionname}{actionname}{templatename}
1053 # exists, and the scrip was created by the system user, it
1054 # will be deleted on upgrade. Lowercase all the names here.
1057 'on correspond' => {
1058 'notify requestors and ccs' => { 'correspondence' => 1 },
1059 'notify other recipients' => { 'correspondence' => 1 },
1061 # superseded by "notify owner and adminccs"
1062 'notify adminccs' => { 'admin correspondence' => 1 },
1063 # the new way, but doesn't work right vs. "open tickets"
1064 'open inactive tickets' => { 'blank' => 1 },
1068 # superseded by "notify owner and adminccs"
1069 'notify adminccs' => { 'transaction' => 1 },
1075 push @ScripActions, (
1077 { Name => 'Extract Custom Field Values', # loc
1078 Description => 'extract cf-values out of a message', # loc
1079 ExecModule => 'ExtractCustomFieldValues' },
1081 { Name => 'Extract Custom Field Values With Code in Template', # loc
1082 Description => 'extract cf-values out of a message with a Text::Template template', # loc
1083 ExecModule => 'ExtractCustomFieldValuesWithCodeInTemplate' }
1089 Name => 'CustomFieldScannerExample', # loc
1090 Description => 'Example Template for ExtractCustomFieldValues', # loc
1091 Content => <<'EOTEXT'
1093 # CF Name | Header name or "Body" | MatchString(re) | Postcmd | Options
1095 #### Allowed Options:
1097 # q - (quiet) Don't record a transaction for adding the custom field
1099 # * - (wildcard) The MatchString regex should contain _two_
1100 # capturing groups, the first of which is the CF name,
1101 # the second of which is the value. If this option is
1102 # given, the <cf-name> field is ignored.
1106 # 1. Put the content of the "X-MI-Test" header into the "testcf"
1108 # testcf|X-MI-Test|.*
1110 # 2. Scan the body for Host:name and put name into the "bodycf" custom
1112 # bodycf|Body|Host:\s*(\w+)
1114 # 3. Scan the "X-MI-IP" header for an IP-Adresse and get the hostname
1115 # by reverse-resolving it:
1116 # Hostname|X-MI-IP|\d+\.\d+\.\d+\.\d+|use Socket; ($value) = gethostbyaddr(inet_aton($value),AF_INET);
1118 # 4. scan the "CC" header for an many email addresses, and add them to
1119 # a custom field named "parsedCCs". If "parsedCCs" is a multivalue
1120 # CF, then this should yield separate values for all email adress
1122 # parsedCCs|CC|.*|$value =~ s/^\s+//; $value =~ s/\s+$//;
1124 # 5. Looks for an "Email:" field in the body of the email, then loads
1125 # up that user and makes them privileged The blank first field
1126 # means the automatic CustomField setting is not invoked.
1127 # |Body|Email:\s*(.+)$|my $u = RT::User->new($RT::SystemUser); $u->LoadByEmail($value); $u->SetPrivileged(1)|
1129 # 6. Looks for any text of the form "Set CF Name: Value" in the body,
1130 # and sets the CF named "CF Name" to the given value, which may be
1131 # multi-line. The '*' option controls the wildcard nature of this
1134 # !Body!^Set ([^\n:]*?):\s*((?s).*?)(?:\Z|\n\Z|\n\n)!!*
1136 # 7. Looks for the regex anywhere in the headers and stores the match
1137 # in the AllHeaderSearch CF
1138 # AllHeaderSearch|Headers|Site:\s*(\w+)
1140 # 8. If you need to dynamically build your matching, and want to trigger on headers and body
1141 # and invode some arbitrary code like example 5
1144 # my $action = 'use My::Site; My::Site::SetSiteID( Ticket => $self->TicketObj, Site => $_ );';
1146 # for my $regex (My::Site::ValidRegexps) {
1147 # for my $from ('headers', 'body') {
1148 # $OUT .= join '~~',