1 # Initial data for a fresh RT3 Installation.
5 RealName => 'Nobody in particular',
6 Comments => 'Do not delete or modify this user. It is integral '
7 . 'to RT\'s internal data structures',
12 RealName => 'RT Admin',
13 Password => 'password',
14 EmailAddress => "root\@localhost",
15 Comments => 'SuperUser',
16 Privileged => '1', } );
20 Type => 'Everyone', # loc
21 Domain => 'SystemInternal',
23 Description => 'Pseudogroup for internal use', # loc
25 { Type => 'Privileged', # loc
26 Domain => 'SystemInternal',
29 Description => 'Pseudogroup for internal use', # loc
32 Type => 'Unprivileged', # loc
33 Domain => 'SystemInternal',
35 Description => 'Pseudogroup for internal use', # loc
38 Type => 'Owner', # loc
39 Domain => 'RT::System-Role',
41 Description => 'SystemRolegroup for internal use', # loc
44 Type => 'Requestor', # loc
45 Domain => 'RT::System-Role',
47 Description => 'SystemRolegroup for internal use', # loc
51 Domain => 'RT::System-Role',
53 Description => 'SystemRolegroup for internal use', # loc
56 Type => 'AdminCc', # loc
57 Domain => 'RT::System-Role',
59 Description => 'Pseudogroup for internal use', # loc
62 @Queues = ({ Name => 'support',
63 Description => 'Support',
64 CorrespondAddress => 'support@PLC_RT_HOSTNAME',
65 CommentAddress => '', },
68 Description => 'Queue for monitor',
69 CorrespondAddress => 'monitor@PLC_RT_HOSTNAME',
70 CommentAddress => '', },
73 Description => 'Queue for security issues',
74 CorrespondAddress => 'security@PLC_RT_HOSTNAME',
75 CommentAddress => '', },
78 Description => 'Queue for legal issues',
79 CorrespondAddress => 'legal@PLC_RT_HOSTNAME',
80 CommentAddress => '', },
82 { Name => '___Approvals',
83 Description => 'A system-internal queue for the approvals system',
88 { Name => 'Autoreply To Requestors', # loc
90 'Always sends a message to the requestors independent of message sender' , # loc
91 ExecModule => 'Autoreply',
92 Argument => 'Requestor' },
93 { Name => 'Notify Requestors', # loc
94 Description => 'Sends a message to the requestors', # loc
95 ExecModule => 'Notify',
96 Argument => 'Requestor' },
97 { Name => 'Notify Owner as Comment', # loc
98 Description => 'Sends mail to the owner', # loc
99 ExecModule => 'NotifyAsComment',
100 Argument => 'Owner' },
101 { Name => 'Notify Owner', # loc
102 Description => 'Sends mail to the owner', # loc
103 ExecModule => 'Notify',
104 Argument => 'Owner' },
105 { Name => 'Notify Ccs as Comment', # loc
106 Description => 'Sends mail to the Ccs as a comment', # loc
107 ExecModule => 'NotifyAsComment',
109 { Name => 'Notify Ccs', # loc
110 Description => 'Sends mail to the Ccs', # loc
111 ExecModule => 'Notify',
113 { Name => 'Notify AdminCcs as Comment', # loc
114 Description => 'Sends mail to the administrative Ccs as a comment', # loc
115 ExecModule => 'NotifyAsComment',
116 Argument => 'AdminCc' },
117 { Name => 'Notify AdminCcs', # loc
118 Description => 'Sends mail to the administrative Ccs', # loc
119 ExecModule => 'Notify',
120 Argument => 'AdminCc' },
122 { Name => 'Notify Requestors and Ccs as Comment', # loc
123 Description => 'Send mail to requestors and Ccs as a comment', # loc
124 ExecModule => 'NotifyAsComment',
125 Argument => 'Requestor,Cc' },
127 { Name => 'Notify Requestors and Ccs', # loc
128 Description => 'Send mail to requestors and Ccs', # loc
129 ExecModule => 'Notify',
130 Argument => 'Requestor,Cc' },
132 { Name => 'Notify Requestors, Ccs and AdminCcs as Comment', # loc
133 Description => 'Send mail to all watchers as a "comment"', # loc
134 ExecModule => 'NotifyAsComment',
136 { Name => 'Notify Requestors, Ccs and AdminCcs', # loc
137 Description => 'Send mail to all watchers', # loc
138 ExecModule => 'Notify',
140 { Name => 'Notify Other Recipients as Comment', # loc
141 Description => 'Sends mail to explicitly listed Ccs and Bccs', # loc
142 ExecModule => 'NotifyAsComment',
143 Argument => 'OtherRecipients' },
144 { Name => 'Notify Other Recipients', # loc
145 Description => 'Sends mail to explicitly listed Ccs and Bccs', # loc
146 ExecModule => 'Notify',
147 Argument => 'OtherRecipients' },
148 { Name => 'User Defined', # loc
149 Description => 'Perform a user-defined action', # loc
150 ExecModule => 'UserDefined', },
151 { Name => 'Create Tickets', # loc
153 'Create new tickets based on this scrip\'s template', # loc
154 ExecModule => 'CreateTickets', },
155 { Name => 'Open Tickets',
156 Description => 'Open tickets on correspondence', # loc
157 ExecModule => 'AutoOpen' },
161 { Name => 'On Create', # loc
162 Description => 'When a ticket is created', # loc
163 ApplicableTransTypes => 'Create',
164 ExecModule => 'AnyTransaction', },
166 { Name => 'On Transaction', # loc
167 Description => 'When anything happens', # loc
168 ApplicableTransTypes => 'Any',
169 ExecModule => 'AnyTransaction', },
172 Name => 'On Correspond', # loc
173 Description => 'Whenever correspondence comes in', # loc
174 ApplicableTransTypes => 'Correspond',
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'
222 { Name => 'User Defined', # loc
223 Description => 'Whenever a user-defined condition occurs', # loc
224 ApplicableTransTypes => 'Any',
225 ExecModule => 'UserDefined'
233 Name => 'Blank', # loc
234 Description => 'A blank template', # loc
237 Name => 'Autoreply', # loc
238 Description => 'Default Autoresponse template', # loc
239 Content => 'Subject: AutoReply: {$Ticket->Subject}
243 Thank you very much for reporting this.
245 This message was automatically generated in response to the
246 creation of a trouble ticket regarding:
248 "{$Ticket->Subject()}"
250 There is no need to reply to this message right now. Your ticket has been
251 assigned an ID of [{$rtname} #{$Ticket->id()}].
253 Please include the string:
255 [{$rtname} #{$Ticket->id}]
257 in the subject line of all future correspondence about this issue. To do so,
258 you may reply to this message.
261 {$Ticket->QueueObj->CorrespondAddress()}
262 {$Ticket->AddCustomFieldValue(Field => 'Problem Category', Value => 'Trivial');}
264 -------------------------------------------------------------------------
265 {$Transaction->Content()}
270 Name => 'Transaction', # loc
271 Description => 'Default transaction template', # loc
272 Content => 'RT-Attach-Message: yes
275 {$Transaction->CreatedAsString}: Request {$Ticket->id} was acted upon.
276 Transaction: {$Transaction->Description}
277 Queue: {$Ticket->QueueObj->Name}
278 Subject: {$Transaction->Subject || $Ticket->Subject || "(No subject given)"}
279 Owner: {$Ticket->OwnerObj->Name}
280 Requestors: {$Ticket->RequestorAddresses}
281 Status: {$Ticket->Status}
282 Ticket <URL: {$RT::WebURL}Ticket/Display.html?id={$Ticket->id} >
285 {$Transaction->Content()}
292 Name => 'Admin Correspondence', # loc
293 Description => 'Default admin correspondence template', # loc
294 Content => 'RT-Attach-Message: yes
297 <URL: {$RT::WebURL}Ticket/Display.html?id={$Ticket->id} >
299 {$Transaction->Content()}
304 Name => 'Correspondence', # loc
305 Description => 'Default correspondence template', # loc
306 Content => 'RT-Attach-Message: yes
308 {$Transaction->Content()}
313 Name => 'Admin Comment', # loc
314 Description => 'Default admin comment template', # loc
316 'Subject: [Comment] {my $s=($Transaction->Subject||$Ticket->Subject); $s =~ s/\\[Comment\\]//g; $comment =~ s/^Re//i; $s;}
319 {$RT::WebURL}Ticket/Display.html?id={$Ticket->id}
320 This is a comment. It is not sent to the Requestor(s):
322 {$Transaction->Content()}
327 Name => 'Status Change', # loc
328 Description => 'Ticket status changed', # loc
329 Content => 'Subject: Status Changed to: {$Transaction->NewValue}
332 {$RT::WebURL}Ticket/Display.html?id={$Ticket->id}
334 {$Transaction->Content()}
341 Name => 'Resolved', # loc
342 Description => 'Ticket Resolved', # loc
343 Content => 'Subject: Resolved: {$Ticket->Subject}
345 According to our records, your request has been resolved. If you have any
346 further questions or concerns, please respond to this message.
351 Name => 'correspondance with CC', # loc
352 Description => 'Message with the recipients in the header', # loc
353 Content => 'RT-Attach-Message: yes
355 Email Recipients (see http://PLC_RT_HOSTNAME/rt3/Ticket/Display.html?id={$Ticket->id})
356 Owner: {$Ticket->OwnerObj->Name}
357 Requestor: {$Ticket->RequestorAddresses}
358 { if ($acc=$Ticket->AdminCcAddresses) { " Ticket Ccs: " . $acc } }
359 ==================================================
361 {$Transaction->Content()}
366 Name => 'Create with CC in body', # loc
367 Description => 'Create with CC in body', # loc
368 Content => 'RT-Attach-Message: yes
370 Email Recipients (see http://PLC_RT_HOSTNAME/rt3/Ticket/Display.html?id={$Ticket->id})
371 Owner: {$Ticket->OwnerObj->Name}
372 Requestor: {$Ticket->RequestorAddresses}
373 { if ($acc=$Ticket->AdminCcAddresses) { " Ticket Ccs: " . $acc } }
374 ==================================================
376 {$Transaction->CreatedAsString}: Request {$Ticket->id} was acted upon.
377 Transaction: {$Transaction->Description}
379 Subject: {$Transaction->Subject || $Ticket->Subject || "(No subject given)"}
381 {$Transaction->Content()}
384 { Queue => '___Approvals',
385 Name => "New Pending Approval", # loc
387 "Notify Owners and AdminCcs of new items pending their approval", # loc
388 Content => 'Subject: New Pending Approval: {$Ticket->Subject}
392 There is a new item pending your approval: "{$Ticket->Subject()}",
393 a summary of which appears below.
395 Please visit {$RT::WebURL}Approvals/Display.html?id={$Ticket->id}
396 to approve or reject this ticket, or {$RT::WebURL}Approvals/ to
397 batch-process all your pending approvals.
399 -------------------------------------------------------------------------
400 {$Transaction->Content()}
403 { Queue => '___Approvals',
404 Name => "Approval Passed", # loc
406 "Notify Owner of their ticket has been approved by some approver", # loc
407 Content => 'Subject: Ticket Approved: {$Ticket->Subject}
411 Your ticket has been approved by { eval { $Approval->OwnerObj->Name } }.
412 Other approvals may be pending.
415 { Queue => '___Approvals',
416 Name => "All Approvals Passed", # loc
418 "Notify Owner of their ticket has been approved by all approvers", # loc
419 Content => 'Subject: Ticket Approved: {$Ticket->Subject}
423 Your ticket has been approved. Its Owner may now start to act on it.
426 { Queue => '___Approvals',
427 Name => "Approval Rejected", # loc
429 "Notify Owner of their rejected ticket", # loc
430 Content => 'Subject: Ticket Rejected: {$Ticket->Subject}
434 Your ticket has been rejected by { eval { $Approval->OwnerObj->Name } }.
441 { ScripCondition => 'On Correspond',
442 ScripAction => 'Open Tickets',
443 Template => 'Blank' },
444 { ScripCondition => 'On Owner Change',
445 ScripAction => 'Notify Owner',
446 Template => 'Transaction' },
447 { ScripCondition => 'On Create',
448 ScripAction => 'AutoReply To Requestors',
449 Template => 'AutoReply' },
450 { ScripCondition => 'On Create',
451 ScripAction => 'Notify AdminCcs',
452 Template => 'Transaction' },
453 { ScripCondition => 'On Correspond',
454 ScripAction => 'Notify AdminCcs',
455 Template => 'Admin Correspondence' },
456 { ScripCondition => 'On Correspond',
457 ScripAction => 'Notify Requestors And Ccs',
458 Template => 'Correspondence' },
459 { ScripCondition => 'On Correspond',
460 ScripAction => 'Notify Other Recipients',
461 Template => 'Correspondence' },
462 { ScripCondition => 'On Comment',
463 ScripAction => 'Notify AdminCcs As Comment',
464 Template => 'Admin Comment' },
465 { ScripCondition => 'On Comment',
466 ScripAction => 'Notify Other Recipients As Comment',
467 Template => 'Correspondence' },
468 { ScripCondition => 'On Resolve',
469 ScripAction => 'Notify Requestors',
470 Template => 'Resolved' },
471 #On Create Autoreply To Requestors with template Autoreply
472 #On Correspond Notify Requestors, Ccs and AdminCcs with template correspondance with CC
473 #On Create Notify AdminCcs with template Create with CC in body
475 { ScripCondition => 'On Create',
476 ScripAction => 'Notify AdminCcs',
477 Template => 'Create with CC in body', },
478 { ScripCondition => 'On Correspond',
479 ScripAction => 'Notify Requestors, Ccs and AdminCcs',
480 Template => 'correspondance with CC', },
481 { Description => "When an approval ticket is created, notify the Owner and AdminCc of the item awaiting their approval", # loc
482 Queue => '___Approvals',
483 ScripCondition => 'User Defined',
484 CustomIsApplicableCode => q[
485 $self->TicketObj->Type eq 'approval' and
486 $self->TransactionObj->Field eq 'Status' and
487 $self->TransactionObj->NewValue eq 'open' and
488 eval { $T::Approving = ($self->TicketObj->AllDependedOnBy( Type => 'ticket' ))[0] }
490 ScripAction => 'Notify Owner',
491 Template => 'New Pending Approval' },
492 { Description => "If an approval is rejected, reject the original and delete pending approvals", # loc
493 Queue => '___Approvals',
494 ScripCondition => 'On Status Change',
495 ScripAction => 'User Defined',
496 CustomPrepareCode => q[
497 # ------------------------------------------------------------------- #
498 return(0) unless ( lc($self->TransactionObj->NewValue) eq "rejected" or
499 lc($self->TransactionObj->NewValue) eq "deleted" );
502 my $links = $self->TicketObj->DependedOnBy;
503 foreach my $link (@{ $links->ItemsArrayRef }) {
504 my $obj = $link->BaseObj;
505 if ($obj->QueueObj->IsActiveStatus($obj->Status)) {
506 if ($obj->Type eq 'ticket') {
508 Content => $self->loc("Your request was rejected."),
511 Status => 'rejected',
515 $T::Approval = $self->TicketObj; # so we can access it inside templates
516 $self->{TicketObj} = $obj; # we want the original id in the token line
528 $links = $self->TicketObj->DependsOn;
529 foreach my $link (@{ $links->ItemsArrayRef }) {
530 my $obj = $link->TargetObj;
531 if ($obj->QueueObj->IsActiveStatus($obj->Status)) {
539 # Now magically turn myself into a Requestor Notify object...
540 require RT::Action::Notify; bless($self, 'RT::Action::Notify');
541 $self->{Argument} = 'Requestor'; $self->Prepare;
544 # ------------------------------------------------------------------- #
546 CustomCommitCode => '"never needed"',
547 Template => 'Approval Rejected', },
548 { Description => "When a ticket has been approved by any approver, add correspondence to the original ticket", # loc
549 Queue => '___Approvals',
550 ScripCondition => 'On Resolve',
551 ScripAction => 'User Defined',
552 CustomPrepareCode => q[
553 # ------------------------------------------------------------------- #
554 return(0) unless ($self->TicketObj->Type eq 'approval');
557 my $t = $self->TicketObj->Transactions;
558 while (my $o = $t->Next) {
559 $note .= $o->Content . "\n" if $o->ContentObj
560 and $o->Content !~ /Default Approval/;
563 foreach my $obj ($self->TicketObj->AllDependedOnBy( Type => 'ticket' )) {
565 Content => $self->loc( "Your request has been approved by [_1]. Other approvals may still be pending.", # loc
566 $self->TransactionObj->CreatorObj->Name,
567 ) . "\n" . $self->loc( "Approver's notes: [_1]", # loc
571 $T::Approval = $self->TicketObj; # so we can access it inside templates
572 $self->{TicketObj} = $obj; # we want the original id in the token line
575 # Now magically turn myself into a Requestor Notify object...
576 require RT::Action::Notify; bless($self, 'RT::Action::Notify');
577 $self->{Argument} = 'Requestor'; $self->Prepare;
580 # ------------------------------------------------------------------- #
582 CustomCommitCode => '"never needed"',
583 Template => 'Approval Passed' },
584 { Description => "When a ticket has been approved by all approvers, add correspondence to the original ticket", # loc
585 Queue => '___Approvals',
586 ScripCondition => 'On Resolve',
587 ScripAction => 'User Defined',
588 CustomPrepareCode => q[
589 # ------------------------------------------------------------------- #
590 # Find all the tickets that depend on this (that this is approving)
592 my $Ticket = $self->TicketObj;
593 my @TOP = $Ticket->AllDependedOnBy( Type => 'ticket' );
594 my $links = $Ticket->DependedOnBy;
597 while (my $link = $links->Next) {
598 my $obj = $link->BaseObj;
599 next if ($obj->HasUnresolvedDependencies( Type => 'approval' ));
601 if ($obj->Type eq 'ticket') {
603 Content => $self->loc("Your request has been approved."),
605 $T::Approval = $Ticket; # so we can access it inside templates
606 $self->{TicketObj} = $obj; # we want the original id in the token line
609 elsif ($obj->Type eq 'approval') {
610 $obj->SetStatus( Status => 'open', Force => 1 );
612 elsif ($RT::UseCodeTickets and $obj->Type eq 'code') {
613 my $code = $obj->Transactions->First->Content;
616 foreach my $TOP (@TOP) {
619 $RT::Logger->error("Cannot eval code: $@") if $@;
623 $obj->SetStatus( Status => 'resolved', Force => 1,);
626 $obj->SetStatus( Status => 'rejected', Force => 1,);
631 # Now magically turn myself into a Requestor Notify object...
632 require RT::Action::Notify; bless($self, 'RT::Action::Notify');
633 $self->{Argument} = 'Requestor'; $self->Prepare;
635 return 0; # ignore $passed;
636 # ------------------------------------------------------------------- #
638 CustomCommitCode => '"never needed"',
639 Template => 'All Approvals Passed', },
644 { UserId => 'Nobody', # - principalId
645 Right => 'OwnTicket', },
647 { UserId => 'root', # - principalid
648 Right => 'SuperUser', },
652 # Predefined searches
655 { Name => 'Search - My Tickets',
656 Description => '[_1] highest priority tickets I own', # loc
658 { Format => "'<a href=\"__WebPath__/Ticket/Display.html?id=__id__\">__id__</a>/TITLE:#', '<a href=\"__WebPath__/Ticket/Display.html?id=__id__\">__Subject__</a>/TITLE:Subject', Priority, QueueName, ExtendedStatus",
659 Query => " Owner = '__CurrentUser__' AND ( Status = 'new' OR Status = 'open')",
660 OrderBy => 'Priority',
663 { Name => 'Search - Unowned Tickets',
664 Description => '[_1] newest unowned tickets', # loc
667 { Format => "'<a href=\"__WebPath__/Ticket/Display.html?id=__id__\">__id__</a>/TITLE:#', '<a href=\"__WebPath__/Ticket/Display.html?id=__id__\">__Subject__</a>/TITLE:Subject', QueueName, ExtendedStatus, CreatedRelative, '<A HREF=\"__WebPath__/Ticket/Display.html?Action=Take&id=__id__\">__loc(Take)__</a>/TITLE: ' ",
668 Query => " Owner = 'Nobody' AND ( Status = 'new' OR Status = 'open')",
669 OrderBy => 'Created',
672 { Name => 'HomepageSettings',
673 Description => 'HomepageSettings',
676 [ { type => 'system', name => 'My Tickets' },
677 { type => 'system', name => 'Unowned Tickets' },
678 { type => 'component', name => 'QuickCreate'},
682 { type => 'component', name => 'MyReminders' },
683 { type => 'component', name => 'Quicksearch' },
684 { type => 'component', name => 'RefreshHomepage' },