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 => 'correspondance with CC', # loc
320 Description => 'Message with the recipients in the header', # 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->Content()}
334 Name => 'Create with CC in body', # loc
335 Description => 'Create with CC in body', # loc
336 Content => 'RT-Attach-Message: yes
338 Email Recipients (see http://PLC_RT_HOSTNAME/rt3/Ticket/Display.html?id={$Ticket->id} )
339 Owner: {$Ticket->OwnerObj->Name}
340 Requestor: {$Ticket->RequestorAddresses}
341 { if ($acc=$Ticket->AdminCcAddresses) { " Ticket Ccs: " . $acc } }
342 ==================================================
344 {$Transaction->CreatedAsString}: Request {$Ticket->id} was acted upon.
345 Transaction: {$Transaction->Description}
347 Subject: {$Transaction->Subject || $Ticket->Subject || "(No subject given)"}
349 {$Transaction->Content()}
352 { Queue => '___Approvals',
353 Name => "New Pending Approval", # loc
355 "Notify Owners and AdminCcs of new items pending their approval", # loc
356 Content => 'Subject: New Pending Approval: {$Ticket->Subject}
360 There is a new item pending your approval: "{$Ticket->Subject()}",
361 a summary of which appears below.
363 Please visit {$RT::WebURL}Approvals/Display.html?id={$Ticket->id}
364 to approve or reject this ticket, or {$RT::WebURL}Approvals/ to
365 batch-process all your pending approvals.
367 -------------------------------------------------------------------------
368 {$Transaction->Content()}
371 { Queue => '___Approvals',
372 Name => "Approval Passed", # loc
374 "Notify Owner of their ticket has been approved by some approver", # loc
375 Content => 'Subject: Ticket Approved: {$Ticket->Subject}
379 Your ticket has been approved by { eval { $Approval->OwnerObj->Name } }.
380 Other approvals may be pending.
383 { Queue => '___Approvals',
384 Name => "All Approvals Passed", # loc
386 "Notify Owner of their ticket has been approved by all approvers", # loc
387 Content => 'Subject: Ticket Approved: {$Ticket->Subject}
391 Your ticket has been approved. Its Owner may now start to act on it.
394 { Queue => '___Approvals',
395 Name => "Approval Rejected", # loc
397 "Notify Owner of their rejected ticket", # loc
398 Content => 'Subject: Ticket Rejected: {$Ticket->Subject}
402 Your ticket has been rejected by { eval { $Approval->OwnerObj->Name } }.
409 { ScripCondition => 'On Correspond',
410 ScripAction => 'Open Tickets',
411 Template => 'Blank' },
412 { ScripCondition => 'On Owner Change',
413 ScripAction => 'Notify Owner',
414 Template => 'Transaction' },
415 { ScripCondition => 'On Create',
416 ScripAction => 'AutoReply To Requestors',
417 Template => 'AutoReply' },
418 { ScripCondition => 'On Create',
419 ScripAction => 'Notify AdminCcs',
420 Template => 'Transaction' },
421 { ScripCondition => 'On Correspond',
422 ScripAction => 'Notify AdminCcs',
423 Template => 'Admin Correspondence' },
424 { ScripCondition => 'On Correspond',
425 ScripAction => 'Notify Requestors And Ccs',
426 Template => 'Correspondence' },
427 { ScripCondition => 'On Correspond',
428 ScripAction => 'Notify Other Recipients',
429 Template => 'Correspondence' },
430 { ScripCondition => 'On Comment',
431 ScripAction => 'Notify AdminCcs As Comment',
432 Template => 'Admin Comment' },
433 { ScripCondition => 'On Comment',
434 ScripAction => 'Notify Other Recipients As Comment',
435 Template => 'Correspondence' },
436 { ScripCondition => 'On Resolve',
437 ScripAction => 'Notify Requestors',
438 Template => 'Resolved' },
440 { ScripCondition => 'On Create',
441 ScripAction => 'Notify AdminCcs',
442 Template => 'Create with CC in body', },
443 { ScripCondition => 'On Correspond',
444 ScripAction => 'Notify Requestors, Ccs and AdminCcs',
445 Template => 'correspondance with CC', },
446 { Description => "When an approval ticket is created, notify the Owner and AdminCc of the item awaiting their approval", # loc
447 Queue => '___Approvals',
448 ScripCondition => 'User Defined',
449 CustomIsApplicableCode => q[
450 $self->TicketObj->Type eq 'approval' and
451 $self->TransactionObj->Field eq 'Status' and
452 $self->TransactionObj->NewValue eq 'open' and
453 eval { $T::Approving = ($self->TicketObj->AllDependedOnBy( Type => 'ticket' ))[0] }
455 ScripAction => 'Notify Owner',
456 Template => 'New Pending Approval' },
457 { Description => "If an approval is rejected, reject the original and delete pending approvals", # loc
458 Queue => '___Approvals',
459 ScripCondition => 'On Status Change',
460 ScripAction => 'User Defined',
461 CustomPrepareCode => q[
462 # ------------------------------------------------------------------- #
463 return(0) unless ( lc($self->TransactionObj->NewValue) eq "rejected" or
464 lc($self->TransactionObj->NewValue) eq "deleted" );
467 my $links = $self->TicketObj->DependedOnBy;
468 foreach my $link (@{ $links->ItemsArrayRef }) {
469 my $obj = $link->BaseObj;
470 if ($obj->QueueObj->IsActiveStatus($obj->Status)) {
471 if ($obj->Type eq 'ticket') {
473 Content => $self->loc("Your request was rejected."),
476 Status => 'rejected',
480 $T::Approval = $self->TicketObj; # so we can access it inside templates
481 $self->{TicketObj} = $obj; # we want the original id in the token line
493 $links = $self->TicketObj->DependsOn;
494 foreach my $link (@{ $links->ItemsArrayRef }) {
495 my $obj = $link->TargetObj;
496 if ($obj->QueueObj->IsActiveStatus($obj->Status)) {
504 # Now magically turn myself into a Requestor Notify object...
505 require RT::Action::Notify; bless($self, 'RT::Action::Notify');
506 $self->{Argument} = 'Requestor'; $self->Prepare;
509 # ------------------------------------------------------------------- #
511 CustomCommitCode => '"never needed"',
512 Template => 'Approval Rejected', },
513 { Description => "When a ticket has been approved by any approver, add correspondence to the original ticket", # loc
514 Queue => '___Approvals',
515 ScripCondition => 'On Resolve',
516 ScripAction => 'User Defined',
517 CustomPrepareCode => q[
518 # ------------------------------------------------------------------- #
519 return(0) unless ($self->TicketObj->Type eq 'approval');
522 my $t = $self->TicketObj->Transactions;
523 while (my $o = $t->Next) {
524 $note .= $o->Content . "\n" if $o->ContentObj
525 and $o->Content !~ /Default Approval/;
528 foreach my $obj ($self->TicketObj->AllDependedOnBy( Type => 'ticket' )) {
530 Content => $self->loc( "Your request has been approved by [_1]. Other approvals may still be pending.", # loc
531 $self->TransactionObj->CreatorObj->Name,
532 ) . "\n" . $self->loc( "Approver's notes: [_1]", # loc
536 $T::Approval = $self->TicketObj; # so we can access it inside templates
537 $self->{TicketObj} = $obj; # we want the original id in the token line
540 # Now magically turn myself into a Requestor Notify object...
541 require RT::Action::Notify; bless($self, 'RT::Action::Notify');
542 $self->{Argument} = 'Requestor'; $self->Prepare;
545 # ------------------------------------------------------------------- #
547 CustomCommitCode => '"never needed"',
548 Template => 'Approval Passed' },
549 { Description => "When a ticket has been approved by all approvers, add correspondence to the original ticket", # loc
550 Queue => '___Approvals',
551 ScripCondition => 'On Resolve',
552 ScripAction => 'User Defined',
553 CustomPrepareCode => q[
554 # ------------------------------------------------------------------- #
555 # Find all the tickets that depend on this (that this is approving)
557 my $Ticket = $self->TicketObj;
558 my @TOP = $Ticket->AllDependedOnBy( Type => 'ticket' );
559 my $links = $Ticket->DependedOnBy;
562 while (my $link = $links->Next) {
563 my $obj = $link->BaseObj;
564 next if ($obj->HasUnresolvedDependencies( Type => 'approval' ));
566 if ($obj->Type eq 'ticket') {
568 Content => $self->loc("Your request has been approved."),
570 $T::Approval = $Ticket; # so we can access it inside templates
571 $self->{TicketObj} = $obj; # we want the original id in the token line
574 elsif ($obj->Type eq 'approval') {
575 $obj->SetStatus( Status => 'open', Force => 1 );
577 elsif ($RT::UseCodeTickets and $obj->Type eq 'code') {
578 my $code = $obj->Transactions->First->Content;
581 foreach my $TOP (@TOP) {
584 $RT::Logger->error("Cannot eval code: $@") if $@;
588 $obj->SetStatus( Status => 'resolved', Force => 1,);
591 $obj->SetStatus( Status => 'rejected', Force => 1,);
596 # Now magically turn myself into a Requestor Notify object...
597 require RT::Action::Notify; bless($self, 'RT::Action::Notify');
598 $self->{Argument} = 'Requestor'; $self->Prepare;
600 return 0; # ignore $passed;
601 # ------------------------------------------------------------------- #
603 CustomCommitCode => '"never needed"',
604 Template => 'All Approvals Passed', },
609 { UserId => 'Nobody', # - principalId
610 Right => 'OwnTicket', },
612 { UserId => 'root', # - principalid
613 Right => 'SuperUser', },
618 # Predefined searches
621 { Name => 'Search - My Tickets',
622 Description => '[_1] highest priority tickets I own', # loc
624 { 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",
625 Query => " Owner = '__CurrentUser__' AND ( Status = 'new' OR Status = 'open')",
626 OrderBy => 'Priority',
629 { Name => 'Search - Unowned Tickets',
630 Description => '[_1] newest unowned tickets', # loc
633 { 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: ' ",
634 Query => " Owner = 'Nobody' AND ( Status = 'new' OR Status = 'open')",
635 OrderBy => 'Created',
638 { Name => 'HomepageSettings',
639 Description => 'HomepageSettings',
642 [ { type => 'system', name => 'My Tickets' },
643 { type => 'system', name => 'Unowned Tickets' },
644 { type => 'component', name => 'QuickCreate'},
648 { type => 'component', name => 'MyReminders' },
649 { type => 'component', name => 'Quicksearch' },
650 { type => 'component', name => 'RefreshHomepage' },