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
238 Name => 'Transaction', # loc
239 Description => 'Default transaction template', # loc
240 Content => 'RT-Attach-Message: yes
243 {$Transaction->CreatedAsString}: Request {$Ticket->id} was acted upon.
244 Transaction: {$Transaction->Description}
245 Queue: {$Ticket->QueueObj->Name}
246 Subject: {$Transaction->Subject || $Ticket->Subject || "(No subject given)"}
247 Owner: {$Ticket->OwnerObj->Name}
248 Requestors: {$Ticket->RequestorAddresses}
249 Status: {$Ticket->Status}
250 Ticket <URL: {$RT::WebURL}Ticket/Display.html?id={$Ticket->id} >
253 {$Transaction->Content()}
260 Name => 'Admin Correspondence', # loc
261 Description => 'Default admin correspondence template', # loc
262 Content => 'RT-Attach-Message: yes
265 <URL: {$RT::WebURL}Ticket/Display.html?id={$Ticket->id} >
267 {$Transaction->Content()}
272 Name => 'Correspondence', # loc
273 Description => 'Default correspondence template', # loc
274 Content => 'RT-Attach-Message: yes
276 {$Transaction->Content()}
281 Name => 'Admin Comment', # loc
282 Description => 'Default admin comment template', # loc
284 'Subject: [Comment] {my $s=($Transaction->Subject||$Ticket->Subject); $s =~ s/\\[Comment\\]//g; $comment =~ s/^Re//i; $s;}
287 {$RT::WebURL}Ticket/Display.html?id={$Ticket->id}
288 This is a comment. It is not sent to the Requestor(s):
290 {$Transaction->Content()}
295 Name => 'Status Change', # loc
296 Description => 'Ticket status changed', # loc
297 Content => 'Subject: Status Changed to: {$Transaction->NewValue}
300 {$RT::WebURL}Ticket/Display.html?id={$Ticket->id}
302 {$Transaction->Content()}
309 Name => 'Resolved', # loc
310 Description => 'Ticket Resolved', # loc
311 Content => 'Subject: Resolved: {$Ticket->Subject}
313 According to our records, your request has been resolved. If you have any
314 further questions or concerns, please respond to this message.
319 Name => 'Create with CC in body', # loc
320 Description => 'Create with CC in body', # loc
321 Content => 'RT-Attach-Message: yes
323 Email Recipients (see http://PLC_RT_HOSTNAME/rt3/Ticket/Display.html?id={$Ticket->id} )
324 Owner: {$Ticket->OwnerObj->Name}
325 Requestor: {$Ticket->RequestorAddresses}
326 { if ($acc=$Ticket->AdminCcAddresses) { " Ticket Ccs: " . $acc } }
327 ==================================================
329 {$Transaction->CreatedAsString}: Request {$Ticket->id} was acted upon.
330 Transaction: {$Transaction->Description}
332 Subject: {$Transaction->Subject || $Ticket->Subject || "(No subject given)"}
334 {$Transaction->Content()}
337 { Queue => '___Approvals',
338 Name => "New Pending Approval", # loc
340 "Notify Owners and AdminCcs of new items pending their approval", # loc
341 Content => 'Subject: New Pending Approval: {$Ticket->Subject}
345 There is a new item pending your approval: "{$Ticket->Subject()}",
346 a summary of which appears below.
348 Please visit {$RT::WebURL}Approvals/Display.html?id={$Ticket->id}
349 to approve or reject this ticket, or {$RT::WebURL}Approvals/ to
350 batch-process all your pending approvals.
352 -------------------------------------------------------------------------
353 {$Transaction->Content()}
356 { Queue => '___Approvals',
357 Name => "Approval Passed", # loc
359 "Notify Owner of their ticket has been approved by some approver", # loc
360 Content => 'Subject: Ticket Approved: {$Ticket->Subject}
364 Your ticket has been approved by { eval { $Approval->OwnerObj->Name } }.
365 Other approvals may be pending.
368 { Queue => '___Approvals',
369 Name => "All Approvals Passed", # loc
371 "Notify Owner of their ticket has been approved by all approvers", # loc
372 Content => 'Subject: Ticket Approved: {$Ticket->Subject}
376 Your ticket has been approved. Its Owner may now start to act on it.
379 { Queue => '___Approvals',
380 Name => "Approval Rejected", # loc
382 "Notify Owner of their rejected ticket", # loc
383 Content => 'Subject: Ticket Rejected: {$Ticket->Subject}
387 Your ticket has been rejected by { eval { $Approval->OwnerObj->Name } }.
394 { ScripCondition => 'On Correspond',
395 ScripAction => 'Open Tickets',
396 Template => 'Blank' },
397 { ScripCondition => 'On Owner Change',
398 ScripAction => 'Notify Owner',
399 Template => 'Transaction' },
400 { ScripCondition => 'On Create',
401 ScripAction => 'AutoReply To Requestors',
402 Template => 'AutoReply' },
403 { ScripCondition => 'On Create',
404 ScripAction => 'Notify AdminCcs',
405 Template => 'Transaction' },
406 { ScripCondition => 'On Correspond',
407 ScripAction => 'Notify AdminCcs',
408 Template => 'Admin Correspondence' },
409 { ScripCondition => 'On Correspond',
410 ScripAction => 'Notify Requestors And Ccs',
411 Template => 'Correspondence' },
412 { ScripCondition => 'On Correspond',
413 ScripAction => 'Notify Other Recipients',
414 Template => 'Correspondence' },
415 { ScripCondition => 'On Comment',
416 ScripAction => 'Notify AdminCcs As Comment',
417 Template => 'Admin Comment' },
418 { ScripCondition => 'On Comment',
419 ScripAction => 'Notify Other Recipients As Comment',
420 Template => 'Correspondence' },
421 { ScripCondition => 'On Resolve',
422 ScripAction => 'Notify Requestors',
423 Template => 'Resolved' },
425 { ScripCondition => 'On Create',
426 ScripAction => 'Notify AdminCcs',
427 Template => 'Create with CC in body', },
428 { ScripCondition => 'On Correspond',
429 ScripAction => 'Notify Requestors, Ccs and AdminCcs',
430 Template => 'correspondance with CC', },
431 { Description => "When an approval ticket is created, notify the Owner and AdminCc of the item awaiting their approval", # loc
432 Queue => '___Approvals',
433 ScripCondition => 'User Defined',
434 CustomIsApplicableCode => q[
435 $self->TicketObj->Type eq 'approval' and
436 $self->TransactionObj->Field eq 'Status' and
437 $self->TransactionObj->NewValue eq 'open' and
438 eval { $T::Approving = ($self->TicketObj->AllDependedOnBy( Type => 'ticket' ))[0] }
440 ScripAction => 'Notify Owner',
441 Template => 'New Pending Approval' },
442 { Description => "If an approval is rejected, reject the original and delete pending approvals", # loc
443 Queue => '___Approvals',
444 ScripCondition => 'On Status Change',
445 ScripAction => 'User Defined',
446 CustomPrepareCode => q[
447 # ------------------------------------------------------------------- #
448 return(0) unless ( lc($self->TransactionObj->NewValue) eq "rejected" or
449 lc($self->TransactionObj->NewValue) eq "deleted" );
452 my $links = $self->TicketObj->DependedOnBy;
453 foreach my $link (@{ $links->ItemsArrayRef }) {
454 my $obj = $link->BaseObj;
455 if ($obj->QueueObj->IsActiveStatus($obj->Status)) {
456 if ($obj->Type eq 'ticket') {
458 Content => $self->loc("Your request was rejected."),
461 Status => 'rejected',
465 $T::Approval = $self->TicketObj; # so we can access it inside templates
466 $self->{TicketObj} = $obj; # we want the original id in the token line
478 $links = $self->TicketObj->DependsOn;
479 foreach my $link (@{ $links->ItemsArrayRef }) {
480 my $obj = $link->TargetObj;
481 if ($obj->QueueObj->IsActiveStatus($obj->Status)) {
489 # Now magically turn myself into a Requestor Notify object...
490 require RT::Action::Notify; bless($self, 'RT::Action::Notify');
491 $self->{Argument} = 'Requestor'; $self->Prepare;
494 # ------------------------------------------------------------------- #
496 CustomCommitCode => '"never needed"',
497 Template => 'Approval Rejected', },
498 { Description => "When a ticket has been approved by any approver, add correspondence to the original ticket", # loc
499 Queue => '___Approvals',
500 ScripCondition => 'On Resolve',
501 ScripAction => 'User Defined',
502 CustomPrepareCode => q[
503 # ------------------------------------------------------------------- #
504 return(0) unless ($self->TicketObj->Type eq 'approval');
507 my $t = $self->TicketObj->Transactions;
508 while (my $o = $t->Next) {
509 $note .= $o->Content . "\n" if $o->ContentObj
510 and $o->Content !~ /Default Approval/;
513 foreach my $obj ($self->TicketObj->AllDependedOnBy( Type => 'ticket' )) {
515 Content => $self->loc( "Your request has been approved by [_1]. Other approvals may still be pending.", # loc
516 $self->TransactionObj->CreatorObj->Name,
517 ) . "\n" . $self->loc( "Approver's notes: [_1]", # loc
521 $T::Approval = $self->TicketObj; # so we can access it inside templates
522 $self->{TicketObj} = $obj; # we want the original id in the token line
525 # Now magically turn myself into a Requestor Notify object...
526 require RT::Action::Notify; bless($self, 'RT::Action::Notify');
527 $self->{Argument} = 'Requestor'; $self->Prepare;
530 # ------------------------------------------------------------------- #
532 CustomCommitCode => '"never needed"',
533 Template => 'Approval Passed' },
534 { Description => "When a ticket has been approved by all approvers, add correspondence to the original ticket", # loc
535 Queue => '___Approvals',
536 ScripCondition => 'On Resolve',
537 ScripAction => 'User Defined',
538 CustomPrepareCode => q[
539 # ------------------------------------------------------------------- #
540 # Find all the tickets that depend on this (that this is approving)
542 my $Ticket = $self->TicketObj;
543 my @TOP = $Ticket->AllDependedOnBy( Type => 'ticket' );
544 my $links = $Ticket->DependedOnBy;
547 while (my $link = $links->Next) {
548 my $obj = $link->BaseObj;
549 next if ($obj->HasUnresolvedDependencies( Type => 'approval' ));
551 if ($obj->Type eq 'ticket') {
553 Content => $self->loc("Your request has been approved."),
555 $T::Approval = $Ticket; # so we can access it inside templates
556 $self->{TicketObj} = $obj; # we want the original id in the token line
559 elsif ($obj->Type eq 'approval') {
560 $obj->SetStatus( Status => 'open', Force => 1 );
562 elsif ($RT::UseCodeTickets and $obj->Type eq 'code') {
563 my $code = $obj->Transactions->First->Content;
566 foreach my $TOP (@TOP) {
569 $RT::Logger->error("Cannot eval code: $@") if $@;
573 $obj->SetStatus( Status => 'resolved', Force => 1,);
576 $obj->SetStatus( Status => 'rejected', Force => 1,);
581 # Now magically turn myself into a Requestor Notify object...
582 require RT::Action::Notify; bless($self, 'RT::Action::Notify');
583 $self->{Argument} = 'Requestor'; $self->Prepare;
585 return 0; # ignore $passed;
586 # ------------------------------------------------------------------- #
588 CustomCommitCode => '"never needed"',
589 Template => 'All Approvals Passed', },
594 { UserId => 'Nobody', # - principalId
595 Right => 'OwnTicket', },
597 { UserId => 'root', # - principalid
598 Right => 'SuperUser', },
603 # Predefined searches
606 { Name => 'Search - My Tickets',
607 Description => '[_1] highest priority tickets I own', # loc
609 { 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",
610 Query => " Owner = '__CurrentUser__' AND ( Status = 'new' OR Status = 'open')",
611 OrderBy => 'Priority',
614 { Name => 'Search - Unowned Tickets',
615 Description => '[_1] newest unowned tickets', # loc
618 { 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: ' ",
619 Query => " Owner = 'Nobody' AND ( Status = 'new' OR Status = 'open')",
620 OrderBy => 'Created',
623 { Name => 'HomepageSettings',
624 Description => 'HomepageSettings',
627 [ { type => 'system', name => 'My Tickets' },
628 { type => 'system', name => 'Unowned Tickets' },
629 { type => 'component', name => 'QuickCreate'},
633 { type => 'component', name => 'MyReminders' },
634 { type => 'component', name => 'Quicksearch' },
635 { type => 'component', name => 'RefreshHomepage' },