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',
257 { Name => 'On Resolve Allow Quiet',
258 Description => 'Whenever a ticket is resolved, '.
259 'except with resolve_quiet',
260 ApplicableTransTypes => 'Status',
261 ExecModule => 'StatusChangeQuietResolve',
267 Name => 'Blank', # loc
268 Description => 'A blank template', # loc
271 Name => 'Autoreply', # loc
272 Description => 'Plain text Autoresponse template', # loc
273 Content => 'Subject: AutoReply: {$Ticket->Subject}
278 This message has been automatically generated in response to the
279 creation of a trouble ticket regarding:
280 "{$Ticket->Subject()}",
281 a summary of which appears below.
283 There is no need to reply to this message right now. Your ticket has been
284 assigned an ID of { $Ticket->SubjectTag }.
286 Please include the string:
288 { $Ticket->SubjectTag }
290 in the subject line of all future correspondence about this issue. To do so,
291 you may reply to this message.
294 {$Ticket->QueueObj->CorrespondAddress()}
296 -------------------------------------------------------------------------
297 {$Transaction->Content()}
301 Name => 'Autoreply in HTML', # loc
302 Description => 'HTML Autoresponse template', # loc
303 Content => q[Subject: AutoReply: {$Ticket->Subject}
304 Content-Type: text/html
308 <p>This message has been automatically generated in response to the
309 creation of a trouble ticket regarding <b>{$Ticket->Subject()}</b>,
310 a summary of which appears below.</p>
312 <p>There is no need to reply to this message right now. Your ticket has been
313 assigned an ID of <b>{$Ticket->SubjectTag}</b>.</p>
315 <p>Please include the string <b>{$Ticket->SubjectTag}</b>
316 in the subject line of all future correspondence about this issue. To do so,
317 you may reply to this message.</p>
320 {$Ticket->QueueObj->CorrespondAddress()}</p>
323 {$Transaction->Content(Type => 'text/html')}
327 Name => 'AutoreplyOrCorrespondence', # loc
328 Description => 'Plaintext AutoreplyOrCorrespondence template', # loc
331 my $creator_name = $Ticket->CreatorObj->Name;
332 my $requestors = $Ticket->Requestors->UserMembersObj;
333 my ( $c_requestor, $r_count ) = ( 0, 0 );
334 while ( my $r = $requestors->Next() ) {
335 if ( $r->Name eq $creator_name ) {
342 my $template = new RT::Template($RT::SystemUser);
345 #if the creator is not a requestor or
346 #there is more than one requestor ( who's not the creator )
347 #use the Correspondence template
348 if ( ! $c_requestor || $r_count ) {
349 $template_name = 'Correspondence';
352 #otherwise use the Autoreply template
353 $template_name = 'Autoreply';
356 #Load the Queue Template
357 $template->LoadQueueTemplate(
358 Queue => $Ticket->Queue,
359 Name => $template_name,
361 #if there's no Queue Template attempt to find a Global one.
362 unless ( $template->id ) {
363 $template->LoadGlobalTemplate( $template_name );
364 unless ( $template->id ) {
365 $RT::Logger->error("Could not load template : $template_name")
368 #Process embedded fields & expressions of true templates;
369 #note that we can only meaningfully use the body
370 my($ret, $msg) = $template->Parse(
371 TicketObj => $Ticket,
372 TransactionObj => $Transaction,
374 $ret ? $template->MIMEObj->stringify : $msg;
379 Name => 'AutoreplyOrCorrespondence in HTML', # loc
380 Description => 'HTML AutoreplyOrCorrespondence template', # loc
383 my $creator_name = $Ticket->CreatorObj->Name;
384 my $requestors = $Ticket->Requestors->UserMembersObj;
385 my ( $c_requestor, $r_count ) = ( 0, 0 );
386 while ( my $r = $requestors->Next() ) {
387 if ( $r->Name eq $creator_name ) {
394 my $template = new RT::Template($RT::SystemUser);
397 #if the creator is not a requestor or
398 #there is more than one requestor ( who's not the creator )
399 #use the Correspondence template
400 if ( ! $c_requestor || $r_count ) {
401 $template_name = 'Correspondence in HTML';
404 #otherwise use the Autoreply in HTML template
405 $template_name = 'Autoreply in HTML';
408 #Load the Queue Template
409 $template->LoadQueueTemplate(
410 Queue => $Ticket->Queue,
411 Name => $template_name,
413 #if there's no Queue Template attempt to find a Global one.
414 unless ( $template->id ) {
415 $template->LoadGlobalTemplate( $template_name );
416 unless ( $template->id ) {
417 $RT::Logger->error("Could not load template : $template_name")
420 #Process embedded fields & expressions of true templates;
421 #note that we can only meaningfully use the body
422 my($ret, $msg) = $template->Parse(
423 TicketObj => $Ticket,
424 TransactionObj => $Transaction,
426 $ret ? $template->MIMEObj->stringify : $msg;
431 Name => 'Transaction', # loc
432 Description => 'Plain text transaction template', # loc
433 Content => 'RT-Attach-Message: yes
436 {$Transaction->CreatedAsString}: Request {$Ticket->id} was acted upon.
437 Transaction: {$Transaction->Description}
438 Queue: {$Ticket->QueueObj->Name}
439 Subject: {$Transaction->Subject || $Ticket->Subject || "(No subject given)"}
440 Owner: {$Ticket->OwnerObj->Name}
441 Requestors: {$Ticket->RequestorAddresses}
442 Status: {$Ticket->Status}
443 Ticket <URL: {RT->Config->Get(\'WebURL\')}Ticket/Display.html?id={$Ticket->id} >
446 {$Transaction->Content()}
450 Name => 'Transaction in HTML', # loc
451 Description => 'HTML transaction template', # loc
452 Content => 'RT-Attach-Message: yes
453 Content-Type: text/html
455 <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>
458 <tr><td align="right"><b>Transaction:</b></td><td>{$Transaction->Description}</td></tr>
459 <tr><td align="right"><b>Queue:</b></td><td>{$Ticket->QueueObj->Name}</td></tr>
460 <tr><td align="right"><b>Subject:</b></td><td>{$Transaction->Subject || $Ticket->Subject || "(No subject given)"} </td></tr>
461 <tr><td align="right"><b>Owner:</b></td><td>{$Ticket->OwnerObj->Name}</td></tr>
462 <tr><td align="right"><b>Requestors:</b></td><td>{$Ticket->RequestorAddresses}</td></tr>
463 <tr><td align="right"><b>Status:</b></td><td>{$Ticket->Status}</td></tr>
464 <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>
468 {$Transaction->Content( Type => "text/html")}
471 # Shadow the global templates of the same name to suppress duplicate
472 # notifications until rules is ripped out.
473 { Queue => "___Approvals",
474 Name => "Transaction in HTML",
477 { Queue => "___Approvals",
478 Name => "Transaction",
484 Name => 'Admin Correspondence', # loc
485 Description => 'Plain text admin correspondence template', # loc
486 Content => 'RT-Attach-Message: yes
489 <URL: {RT->Config->Get(\'WebURL\')}Ticket/Display.html?id={$Ticket->id} >
491 {$Transaction->Content()}
495 Name => 'Admin Correspondence in HTML', # loc
496 Description => 'HTML admin correspondence template', # loc
497 Content => 'RT-Attach-Message: yes
498 Content-Type: text/html
500 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>
503 {$Transaction->Content(Type => "text/html");}
507 Name => 'Correspondence', # loc
508 Description => 'Plain text correspondence template', # loc
509 Content => 'RT-Attach-Message: yes
511 {$Transaction->Content()}
515 Name => 'Correspondence in HTML', # loc
516 Description => 'HTML correspondence template', # loc
517 Content => 'RT-Attach-Message: yes
518 Content-Type: text/html
520 {$Transaction->Content( Type => "text/html")}
524 Name => 'Admin Comment', # loc
525 Description => 'Plain text admin comment template', # loc
527 'Subject: [Comment] {my $s=($Transaction->Subject||$Ticket->Subject||""); $s =~ s/\\[Comment\\]\\s*//g; $s =~ s/^Re:\\s*//i; $s;}
528 RT-Attach-Message: yes
531 {RT->Config->Get(\'WebURL\')}Ticket/Display.html?id={$Ticket->id}
532 This is a comment. It is not sent to the Requestor(s):
534 {$Transaction->Content()}
538 Name => 'Admin Comment in HTML', # loc
539 Description => 'HTML admin comment template', # loc
541 'Subject: [Comment] {my $s=($Transaction->Subject||$Ticket->Subject||""); $s =~ s/\\[Comment\\]\\s*//g; $s =~ s/^Re:\\s*//i; $s;}
542 RT-Attach-Message: yes
543 Content-Type: text/html
545 <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>
547 {$Transaction->Content(Type => "text/html")}
551 Name => 'Reminder', # loc
552 Description => 'Default reminder template', # loc
554 'Subject:{$Ticket->Subject} is due {$Ticket->DueObj->AsString}
556 This reminder is for ticket #{$Target = $Ticket->RefersTo->First->TargetObj;$Target->Id}.
558 {RT->Config->Get(\'WebURL\')}Ticket/Display.html?id={$Target->Id}
563 Name => 'Status Change', # loc
564 Description => 'Ticket status changed', # loc
565 Content => 'Subject: Status Changed to: {$Transaction->NewValue}
568 {RT->Config->Get(\'WebURL\')}Ticket/Display.html?id={$Ticket->id}
570 {$Transaction->Content()}
574 Name => 'Status Change in HTML', # loc
575 Description => 'HTML Ticket status changed', # loc
576 Content => 'Subject: Status Changed to: {$Transaction->NewValue}
577 Content-Type: text/html
579 <a href="{RT->Config->Get("WebURL")}Ticket/Display.html?id={$Ticket->id}">{RT->Config->Get("WebURL")}Ticket/Display.html?id={$Ticket->id}</a>
582 {$Transaction->Content(Type => "text/html")}
588 Name => 'Resolved', # loc
589 Description => 'Ticket Resolved', # loc
590 Content => 'Subject: Resolved: {$Ticket->Subject}
592 According to our records, your request has been resolved. If you have any
593 further questions or concerns, please respond to this message.
597 Name => 'Resolved in HTML', # loc
598 Description => 'HTML Ticket Resolved', # loc
599 Content => 'Subject: Resolved: {$Ticket->Subject}
600 Content-Type: text/html
602 <p>According to our records, your request has been resolved. If you have any further questions or concerns, please respond to this message.</p>
605 { Queue => '___Approvals',
606 Name => "New Pending Approval", # loc
608 "Notify Owners and AdminCcs of new items pending their approval", # loc
609 Content => 'Subject: New Pending Approval: {$Ticket->Subject}
613 There is a new item pending your approval: "{$Ticket->Subject()}",
614 a summary of which appears below.
616 Please visit {RT->Config->Get(\'WebURL\')}Approvals/Display.html?id={$Ticket->id}
617 to approve or reject this ticket, or {RT->Config->Get(\'WebURL\')}Approvals/ to
618 batch-process all your pending approvals.
620 -------------------------------------------------------------------------
621 {$Transaction->Content()}
624 { Queue => '___Approvals',
625 Name => "New Pending Approval in HTML", # loc
626 Description => "Notify Owners and AdminCcs of new items pending their approval", # loc
627 Content => 'Subject: New Pending Approval: {$Ticket->Subject}
628 Content-Type: text/html
632 <p>There is a new item pending your approval: <b>{$Ticket->Subject()}</b>,
633 a summary of which appears below.</p>
635 <p>Please <a href="{RT->Config->Get(\'WebURL\')}Approvals/Display.html?id={$Ticket->id}">approve
636 or reject this ticket</a>, or visit the <a href="{RT->Config->Get(\'WebURL\')}Approvals/">approvals
637 overview</a> to batch-process all your pending approvals.</p>
640 {$Transaction->Content()}
643 { Queue => '___Approvals',
644 Name => "Approval Passed", # loc
646 "Notify Requestor of their ticket has been approved by some approver", # loc
647 Content => 'Subject: Ticket Approved: {$Ticket->Subject}
651 Your ticket has been approved by { eval { $Approver->Name } }.
652 Other approvals may be pending.
654 Approver\'s notes: { $Notes }
657 { Queue => '___Approvals',
658 Name => "Approval Passed in HTML", # loc
660 "Notify Requestor of their ticket has been approved by some approver", # loc
661 Content => 'Subject: Ticket Approved: {$Ticket->Subject}
662 Content-Type: text/html
666 <p>Your ticket has been approved by <b>{ eval { $Approver->Name } }</b>.
667 Other approvals may be pending.</p>
669 <p>Approver\'s notes:</p>
670 <blockquote>{ $Notes }</blockquote>
673 { Queue => '___Approvals',
674 Name => "All Approvals Passed", # loc
676 "Notify Requestor of their ticket has been approved by all approvers", # loc
677 Content => 'Subject: Ticket Approved: {$Ticket->Subject}
681 Your ticket has been approved by { eval { $Approver->Name } }.
682 Its Owner may now start to act on it.
684 Approver\'s notes: { $Notes }
687 { Queue => '___Approvals',
688 Name => "All Approvals Passed in HTML", # loc
690 "Notify Requestor of their ticket has been approved by all approvers", # loc
691 Content => 'Subject: Ticket Approved: {$Ticket->Subject}
692 Content-Type: text/html
696 <p>Your ticket has been approved by <b>{ eval { $Approver->Name } }</b>.
697 Its Owner may now start to act on it.</p>
699 <p>Approver\'s notes:</p>
700 <blockquote>{ $Notes }</blockquote>
703 { Queue => '___Approvals',
704 Name => "Approval Rejected", # loc
706 "Notify Owner of their rejected ticket", # loc
707 Content => 'Subject: Ticket Rejected: {$Ticket->Subject}
711 Your ticket has been rejected by { eval { $Approver->Name } }.
713 Approver\'s notes: { $Notes }
716 { Queue => '___Approvals',
717 Name => "Approval Rejected in HTML", # loc
719 "Notify Owner of their rejected ticket", # loc
720 Content => 'Subject: Ticket Rejected: {$Ticket->Subject}
721 Content-Type: text/html
725 <p>Your ticket has been rejected by <b>{ eval { $Approver->Name } }</b>.</p>
727 <p>Approver\'s notes:</p>
728 <blockquote>{ $Notes }</blockquote>
731 { Queue => '___Approvals',
732 Name => "Approval Ready for Owner", # loc
734 "Notify Owner of their ticket has been approved and is ready to be acted on", # loc
735 Content => 'Subject: Ticket Approved: {$Ticket->Subject}
739 The ticket has been approved, you may now start to act on it.
743 { Queue => '___Approvals',
744 Name => "Approval Ready for Owner in HTML", # loc
746 "Notify Owner of their ticket has been approved and is ready to be acted on", # loc
747 Content => 'Subject: Ticket Approved: {$Ticket->Subject}
748 Content-Type: text/html
752 <p>The ticket has been approved, you may now start to act on it.</p>
757 Name => "Forward", # loc
758 Description => "Forwarded message", # loc
761 { $ForwardTransaction->Content =~ /\S/ ? $ForwardTransaction->Content : "This is a forward of transaction #".$Transaction->id." of ticket #". $Ticket->id }
765 Name => "Forward Ticket", # loc
766 Description => "Forwarded ticket message", # loc
769 { $ForwardTransaction->Content =~ /\S/ ? $ForwardTransaction->Content : "This is a forward of ticket #". $Ticket->id }
773 Name => "Error: unencrypted message", # loc
775 "Inform user that their unencrypted mail has been rejected", # loc
776 Content => q{Subject: RT requires that all incoming mail be encrypted
778 You received this message because RT received mail from you that was not encrypted. As such, it has been rejected.
782 Name => "Error: public key", # loc
784 "Inform user that he has problems with public key and couldn't recieve encrypted content", # loc
785 Content => q{Subject: We have no your public key or it's wrong
787 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.
791 Name => "Error to RT owner: public key", # loc
793 "Inform RT owner that user(s) have problems with public keys", # loc
794 Content => q{Subject: Some users have problems with public keys
796 You received this message as RT has problems with public keys of the following user:
798 foreach my $e ( @BadRecipients ) {
799 $OUT .= "* ". $e->{'Message'} ."\n";
804 Name => "Error: no private key", # loc
806 "Inform user that we received an encrypted email and we have no private keys to decrypt", # loc
807 Content => q{Subject: we received message we cannot decrypt
809 You sent an encrypted message with subject '{ $Message->head->get('Subject') }',
810 but we have no private key it's encrypted to.
812 Please, check that you encrypt messages with correct keys
813 or contact the system administrator.}
816 Name => "Error: bad encrypted data", # loc
818 "Inform user that a message he sent has invalid encryption data", # loc
819 Content => q{Subject: We received a message we cannot handle
821 You sent us a message that we cannot handle due to corrupted signature or encrypted block. we get the following error(s):
822 { foreach my $msg ( @Messages ) {
828 Name => "PasswordChange", # loc
830 "Inform user that his password has been reset", # loc
831 Content => q{Subject: [{RT->Config->Get('rtname')}] Password reset
835 Someone at {$ENV{'REMOTE_ADDR'}} requested a password reset for you on {RT->Config->Get('WebURL')}
837 Your new password is:
843 Name => 'Email Digest', # loc
844 Description => 'Email template for periodic notification digests', # loc
845 Content => q[Subject: RT Email Digest
853 Name => "Error: Missing dashboard", # loc
855 "Inform user that a dashboard he subscribed to is missing", # loc
856 Content => q{Subject: [{RT->Config->Get('rtname')}] Missing dashboard!
860 You are subscribed to a dashboard that is currently missing. Most likely, the dashboard was deleted.
862 RT will remove this subscription as it is no longer useful. Here's the information RT had about your subscription:
864 DashboardID: { $SubscriptionObj->SubValue('DashboardId') }
865 Frequency: { $SubscriptionObj->SubValue('Frequency') }
866 Hour: { $SubscriptionObj->SubValue('Hour') }
868 $SubscriptionObj->SubValue('Frequency') eq 'weekly'
869 ? "Day of week: " . $SubscriptionObj->SubValue('Dow')
870 : $SubscriptionObj->SubValue('Frequency') eq 'monthly'
871 ? "Day of month: " . $SubscriptionObj->SubValue('Dom')
877 Name => 'Custom Field Transaction',
878 Description => 'Custom field value changed',
879 Content => q[Subject: {$Transaction->BriefDescription()}
881 {RT->Config->Get('WebURL')}Ticket/Display.html?id={$Ticket->id}
883 {$Transaction->Content()}
890 { Description => 'On Comment Notify AdminCcs as Comment',
891 ScripCondition => 'On Comment',
892 ScripAction => 'Notify AdminCcs As Comment',
893 Template => 'Admin Comment in HTML' },
894 { Description => 'On Comment Notify Other Recipients as Comment',
895 ScripCondition => 'On Comment',
896 ScripAction => 'Notify Other Recipients As Comment',
897 Template => 'Correspondence in HTML' },
898 { Description => 'On Correspond Notify Owner and AdminCcs',
899 ScripCondition => 'On Correspond',
900 ScripAction => 'Notify Owner and AdminCcs',
901 Template => 'Admin Correspondence in HTML' },
902 # { Description => 'On Correspond Notify Other Recipients',
903 # ScripCondition => 'On Correspond',
904 # ScripAction => 'Notify Other Recipients',
905 # Template => 'Correspondence in HTML' },
906 # { Description => 'On Correspond Notify Requestors and Ccs',
907 # ScripCondition => 'On Correspond',
908 # ScripAction => 'Notify Requestors And Ccs',
909 # Template => 'Correspondence in HTML' },
910 { Description => 'On Correspond Notify Requestors, Ccs, and Other Recipients',
911 ScripCondition => 'On Correspond',
912 ScripAction => 'Notify Requestors, Ccs, and Other Recipients',
913 Template => 'Correspondence', },
915 { Description => 'On Correspond Open Tickets',
916 ScripCondition => 'On Correspond',
917 ScripAction => 'Open Tickets',
918 Template => 'Blank' },
919 { Description => 'On Create Autoreply To Requestors',
920 ScripCondition => 'On Create',
921 ScripAction => 'AutoReply To Requestors',
922 Template => 'AutoReply in HTML' },
923 { Description => 'On Create Notify Owner and AdminCcs',
924 ScripCondition => 'On Create',
925 ScripAction => 'Notify Owner and AdminCcs',
926 Template => 'Transaction in HTML' },
927 { Description => 'On Create Notify Ccs',
928 ScripCondition => 'On Create',
929 ScripAction => 'Notify Ccs',
930 Template => 'Correspondence in HTML' },
931 { Description => 'On Create Notify Other Recipients',
932 ScripCondition => 'On Create',
933 ScripAction => 'Notify Other Recipients',
934 Template => 'Correspondence in HTML' },
935 { Description => 'On Owner Change Notify Owner',
936 ScripCondition => 'On Owner Change',
937 ScripAction => 'Notify Owner',
938 Template => 'Transaction in HTML' },
939 # { Description => 'On Resolve Notify Requestors',
940 # ScripCondition => 'On Resolve',
941 # ScripAction => 'Notify Requestors',
942 # Template => 'Resolved in HTML' },
943 { Description => 'On Resolve Notify Requestors, Allow Quiet Resolve',
944 ScripCondition => 'On Resolve Allow Quiet',
945 ScripAction => 'Notify Requestors',
946 Template => 'Resolved in HTML' },
947 { Description => "On transaction, add any tags in the transaction's subject to the ticket's subject",
948 ScripCondition => 'On Transaction',
949 ScripAction => 'Extract Subject Tag',
950 Template => 'Blank' },
951 { Description => 'On Forward Transaction Send forwarded message',
952 ScripCondition => 'On Forward Transaction',
953 ScripAction => 'Send Forward',
954 Template => 'Forward' },
955 { Description => 'On Forward Ticket Send forwarded message',
956 ScripCondition => 'On Forward Ticket',
957 ScripAction => 'Send Forward',
958 Template => 'Forward Ticket' },
959 { Description => 'On Correspond, cancel future resolve',
960 ScripCondition => 'On Correspond',
961 ScripAction => 'Cancel Scheduled Resolve',
962 Template => 'Blank' },
966 { UserId => 'root', # - principalid
967 Right => 'SuperUser', },
969 { GroupDomain => 'SystemInternal',
970 GroupType => 'privileged',
971 Right => 'ShowApprovalsTab', },
975 # Predefined searches
978 { Name => 'Search - My Tickets',
979 Description => '[_1] highest priority tickets I own', # loc
981 { Format => q{'<a href="__WebPath__/Ticket/Display.html?id=__id__">__id__</a>/TITLE:#',}
982 . q{'<a href="__WebPath__/Ticket/Display.html?id=__id__">__Subject__</a>/TITLE:Subject',}
983 . q{Priority, QueueName, ExtendedStatus},
984 Query => " Owner = '__CurrentUser__' AND ( Status = 'new' OR Status = 'open')",
985 OrderBy => 'Priority',
989 { Name => 'Search - Unowned Tickets',
990 Description => '[_1] newest unowned tickets', # loc
993 { Format => q{'<a href="__WebPath__/Ticket/Display.html?id=__id__">__id__</a>/TITLE:#',}
994 . q{'<a href="__WebPath__/Ticket/Display.html?id=__id__">__Subject__</a>/TITLE:Subject',}
995 . q{QueueName, ExtendedStatus, CreatedRelative, }
996 . q{'<A HREF="__WebPath__/Ticket/Display.html?Action=Take&id=__id__">__loc(Take)__</a>/TITLE:NBSP'},
997 Query => " Owner = 'Nobody' AND ( Status = 'new' OR Status = 'open')",
998 OrderBy => 'Created',
1002 { Name => 'Search - Bookmarked Tickets',
1003 Description => 'Bookmarked Tickets', #loc
1005 { Format => q{'<a href="__WebPath__/Ticket/Display.html?id=__id__">__id__</a>/TITLE:#',}
1006 . q{'<a href="__WebPath__/Ticket/Display.html?id=__id__">__Subject__</a>/TITLE:Subject',}
1007 . q{Priority, QueueName, ExtendedStatus, Bookmark},
1008 Query => "id = '__Bookmarked__'",
1009 OrderBy => 'LastUpdated',
1013 Name => 'HomepageSettings',
1014 Description => 'HomepageSettings',
1016 'body' => # loc_left_pair
1020 name => 'My Tickets', # loc
1024 name => 'Unowned Tickets' # loc
1028 name => 'Bookmarked Tickets' # loc
1031 type => 'component',
1032 name => 'QuickCreate' # loc
1035 'sidebar' => # loc_left_pair
1038 type => 'component',
1039 name => 'MyReminders' # loc
1042 type => 'component',
1043 name => 'Quicksearch' # loc
1046 type => 'component',
1047 name => 'Dashboards' # loc
1050 type => 'component',
1051 name => 'RefreshHomepage' # loc
1059 # Obsolete/erroneous scrips
1061 # $Delete_Scrips{conditionname}{actionname}{templatename}
1062 # exists, and the scrip was created by the system user, it
1063 # will be deleted on upgrade. Lowercase all the names here.
1066 'on correspond' => {
1067 'notify requestors and ccs' => { 'correspondence' => 1 },
1068 'notify other recipients' => { 'correspondence' => 1 },
1070 # superseded by "notify owner and adminccs"
1071 'notify adminccs' => { 'admin correspondence' => 1 },
1072 # the new way, but doesn't work right vs. "open tickets"
1073 'open inactive tickets' => { 'blank' => 1 },
1077 # superseded by "notify owner and adminccs"
1078 'notify adminccs' => { 'transaction' => 1 },
1081 # superseded by "On Resolve Notify Requestors, Allow Quiet Resolve"
1082 'notify requestors' => { 'resolved in html' => 1 },
1088 push @ScripActions, (
1090 { Name => 'Extract Custom Field Values', # loc
1091 Description => 'extract cf-values out of a message', # loc
1092 ExecModule => 'ExtractCustomFieldValues' },
1094 { Name => 'Extract Custom Field Values With Code in Template', # loc
1095 Description => 'extract cf-values out of a message with a Text::Template template', # loc
1096 ExecModule => 'ExtractCustomFieldValuesWithCodeInTemplate' }
1102 Name => 'CustomFieldScannerExample', # loc
1103 Description => 'Example Template for ExtractCustomFieldValues', # loc
1104 Content => <<'EOTEXT'
1106 # CF Name | Header name or "Body" | MatchString(re) | Postcmd | Options
1108 #### Allowed Options:
1110 # q - (quiet) Don't record a transaction for adding the custom field
1112 # * - (wildcard) The MatchString regex should contain _two_
1113 # capturing groups, the first of which is the CF name,
1114 # the second of which is the value. If this option is
1115 # given, the <cf-name> field is ignored.
1119 # 1. Put the content of the "X-MI-Test" header into the "testcf"
1121 # testcf|X-MI-Test|.*
1123 # 2. Scan the body for Host:name and put name into the "bodycf" custom
1125 # bodycf|Body|Host:\s*(\w+)
1127 # 3. Scan the "X-MI-IP" header for an IP-Adresse and get the hostname
1128 # by reverse-resolving it:
1129 # Hostname|X-MI-IP|\d+\.\d+\.\d+\.\d+|use Socket; ($value) = gethostbyaddr(inet_aton($value),AF_INET);
1131 # 4. scan the "CC" header for an many email addresses, and add them to
1132 # a custom field named "parsedCCs". If "parsedCCs" is a multivalue
1133 # CF, then this should yield separate values for all email adress
1135 # parsedCCs|CC|.*|$value =~ s/^\s+//; $value =~ s/\s+$//;
1137 # 5. Looks for an "Email:" field in the body of the email, then loads
1138 # up that user and makes them privileged The blank first field
1139 # means the automatic CustomField setting is not invoked.
1140 # |Body|Email:\s*(.+)$|my $u = RT::User->new($RT::SystemUser); $u->LoadByEmail($value); $u->SetPrivileged(1)|
1142 # 6. Looks for any text of the form "Set CF Name: Value" in the body,
1143 # and sets the CF named "CF Name" to the given value, which may be
1144 # multi-line. The '*' option controls the wildcard nature of this
1147 # !Body!^Set ([^\n:]*?):\s*((?s).*?)(?:\Z|\n\Z|\n\n)!!*
1149 # 7. Looks for the regex anywhere in the headers and stores the match
1150 # in the AllHeaderSearch CF
1151 # AllHeaderSearch|Headers|Site:\s*(\w+)
1153 # 8. If you need to dynamically build your matching, and want to trigger on headers and body
1154 # and invode some arbitrary code like example 5
1157 # my $action = 'use My::Site; My::Site::SetSiteID( Ticket => $self->TicketObj, Site => $_ );';
1159 # for my $regex (My::Site::ValidRegexps) {
1160 # for my $from ('headers', 'body') {
1161 # $OUT .= join '~~',