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 => 'Enoch Root',
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 => 'Queue for general issues',
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 => '', },
83 Description => 'The default queue',
84 CorrespondAddress => "",
85 CommentAddress => "", },
87 { Name => '___Approvals',
88 Description => 'A system-internal queue for the approvals system',
93 { Name => 'Autoreply To Requestors', # loc
95 'Always sends a message to the requestors independent of message sender' , # loc
96 ExecModule => 'Autoreply',
97 Argument => 'Requestor' },
98 { Name => 'Notify Requestors', # loc
99 Description => 'Sends a message to the requestors', # loc
100 ExecModule => 'Notify',
101 Argument => 'Requestor' },
102 { Name => 'Notify Owner as Comment', # loc
103 Description => 'Sends mail to the owner', # loc
104 ExecModule => 'NotifyAsComment',
105 Argument => 'Owner' },
106 { Name => 'Notify Owner', # loc
107 Description => 'Sends mail to the owner', # loc
108 ExecModule => 'Notify',
109 Argument => 'Owner' },
110 { Name => 'Notify Ccs as Comment', # loc
111 Description => 'Sends mail to the Ccs as a comment', # loc
112 ExecModule => 'NotifyAsComment',
114 { Name => 'Notify Ccs', # loc
115 Description => 'Sends mail to the Ccs', # loc
116 ExecModule => 'Notify',
118 { Name => 'Notify AdminCcs as Comment', # loc
119 Description => 'Sends mail to the administrative Ccs as a comment', # loc
120 ExecModule => 'NotifyAsComment',
121 Argument => 'AdminCc' },
122 { Name => 'Notify AdminCcs', # loc
123 Description => 'Sends mail to the administrative Ccs', # loc
124 ExecModule => 'Notify',
125 Argument => 'AdminCc' },
127 { Name => 'Notify Requestors and Ccs as Comment', # loc
128 Description => 'Send mail to requestors and Ccs as a comment', # loc
129 ExecModule => 'NotifyAsComment',
130 Argument => 'Requestor,Cc' },
132 { Name => 'Notify Requestors and Ccs', # loc
133 Description => 'Send mail to requestors and Ccs', # loc
134 ExecModule => 'Notify',
135 Argument => 'Requestor,Cc' },
137 { Name => 'Notify Requestors, Ccs and AdminCcs as Comment', # loc
138 Description => 'Send mail to all watchers as a "comment"', # loc
139 ExecModule => 'NotifyAsComment',
141 { Name => 'Notify Requestors, Ccs and AdminCcs', # loc
142 Description => 'Send mail to all watchers', # loc
143 ExecModule => 'Notify',
145 { Name => 'Notify Other Recipients as Comment', # loc
146 Description => 'Sends mail to explicitly listed Ccs and Bccs', # loc
147 ExecModule => 'NotifyAsComment',
148 Argument => 'OtherRecipients' },
149 { Name => 'Notify Other Recipients', # loc
150 Description => 'Sends mail to explicitly listed Ccs and Bccs', # loc
151 ExecModule => 'Notify',
152 Argument => 'OtherRecipients' },
153 { Name => 'User Defined', # loc
154 Description => 'Perform a user-defined action', # loc
155 ExecModule => 'UserDefined', },
156 { Name => 'Create Tickets', # loc
158 'Create new tickets based on this scrip\'s template', # loc
159 ExecModule => 'CreateTickets', },
160 { Name => 'Open Tickets',
161 Description => 'Open tickets on correspondence', # loc
162 ExecModule => 'AutoOpen' },
166 { Name => 'On Create', # loc
167 Description => 'When a ticket is created', # loc
168 ApplicableTransTypes => 'Create',
169 ExecModule => 'AnyTransaction', },
171 { Name => 'On Transaction', # loc
172 Description => 'When anything happens', # loc
173 ApplicableTransTypes => 'Any',
174 ExecModule => 'AnyTransaction', },
177 Name => 'On Correspond', # loc
178 Description => 'Whenever correspondence comes in', # loc
179 ApplicableTransTypes => 'Correspond',
180 ExecModule => 'AnyTransaction', },
184 Name => 'On Comment', # loc
185 Description => 'Whenever comments come in', # loc
186 ApplicableTransTypes => 'Comment',
187 ExecModule => 'AnyTransaction' },
190 Name => 'On Status Change', # loc
191 Description => 'Whenever a ticket\'s status changes', # loc
192 ApplicableTransTypes => 'Status',
193 ExecModule => 'AnyTransaction',
198 Name => 'On Priority Change', # loc
199 Description => 'Whenever a ticket\'s priority changes', # loc
200 ApplicableTransTypes => 'Set',
201 ExecModule => 'PriorityChange',
205 Name => 'On Owner Change', # loc
206 Description => 'Whenever a ticket\'s owner changes', # loc
207 ApplicableTransTypes => 'Any',
208 ExecModule => 'OwnerChange',
213 Name => 'On Queue Change', # loc
214 Description => 'Whenever a ticket\'s queue changes', # loc
215 ApplicableTransTypes => 'Set',
216 ExecModule => 'QueueChange',
219 { Name => 'On Resolve', # loc
220 Description => 'Whenever a ticket is resolved', # loc
221 ApplicableTransTypes => 'Status',
222 ExecModule => 'StatusChange',
223 Argument => 'resolved'
227 { Name => 'User Defined', # loc
228 Description => 'Whenever a user-defined condition occurs', # loc
229 ApplicableTransTypes => 'Any',
230 ExecModule => 'UserDefined'
238 Name => 'Blank', # loc
239 Description => 'A blank template', # loc
242 Name => 'Autoreply', # loc
243 Description => 'Default Autoresponse template', # loc
244 Content => 'Subject: AutoReply: {$Ticket->Subject}
249 This message has been automatically generated in response to the
250 creation of a trouble ticket regarding:
251 "{$Ticket->Subject()}",
252 a summary of which appears below.
254 There is no need to reply to this message right now. Your ticket has been
255 assigned an ID of [{$rtname} #{$Ticket->id()}].
257 Please include the string:
259 [{$rtname} #{$Ticket->id}]
261 in the subject line of all future correspondence about this issue. To do so,
262 you may reply to this message.
265 {$Ticket->QueueObj->CorrespondAddress()}
267 -------------------------------------------------------------------------
268 {$Transaction->Content()}
273 Name => 'Transaction', # loc
274 Description => 'Default transaction template', # loc
275 Content => 'RT-Attach-Message: yes
278 {$Transaction->CreatedAsString}: Request {$Ticket->id} was acted upon.
279 Transaction: {$Transaction->Description}
280 Queue: {$Ticket->QueueObj->Name}
281 Subject: {$Transaction->Subject || $Ticket->Subject || "(No subject given)"}
282 Owner: {$Ticket->OwnerObj->Name}
283 Requestors: {$Ticket->RequestorAddresses}
284 Status: {$Ticket->Status}
285 Ticket <URL: {$RT::WebURL}Ticket/Display.html?id={$Ticket->id} >
288 {$Transaction->Content()}
295 Name => 'Admin Correspondence', # loc
296 Description => 'Default admin correspondence template', # loc
297 Content => 'RT-Attach-Message: yes
300 <URL: {$RT::WebURL}Ticket/Display.html?id={$Ticket->id} >
302 {$Transaction->Content()}
307 Name => 'Correspondence', # loc
308 Description => 'Default correspondence template', # loc
309 Content => 'RT-Attach-Message: yes
311 {$Transaction->Content()}
316 Name => 'Admin Comment', # loc
317 Description => 'Default admin comment template', # loc
319 'Subject: [Comment] {my $s=($Transaction->Subject||$Ticket->Subject); $s =~ s/\\[Comment\\]//g; $comment =~ s/^Re//i; $s;}
322 {$RT::WebURL}Ticket/Display.html?id={$Ticket->id}
323 This is a comment. It is not sent to the Requestor(s):
325 {$Transaction->Content()}
330 Name => 'Status Change', # loc
331 Description => 'Ticket status changed', # loc
332 Content => 'Subject: Status Changed to: {$Transaction->NewValue}
335 {$RT::WebURL}Ticket/Display.html?id={$Ticket->id}
337 {$Transaction->Content()}
344 Name => 'Resolved', # loc
345 Description => 'Ticket Resolved', # loc
346 Content => 'Subject: Resolved: {$Ticket->Subject}
348 According to our records, your request has been resolved. If you have any
349 further questions or concerns, please respond to this message.
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' },
439 { Description => "When an approval ticket is created, notify the Owner and AdminCc of the item awaiting their approval", # loc
440 Queue => '___Approvals',
441 ScripCondition => 'User Defined',
442 CustomIsApplicableCode => q[
443 $self->TicketObj->Type eq 'approval' and
444 $self->TransactionObj->Field eq 'Status' and
445 $self->TransactionObj->NewValue eq 'open' and
446 eval { $T::Approving = ($self->TicketObj->AllDependedOnBy( Type => 'ticket' ))[0] }
448 ScripAction => 'Notify Owner',
449 Template => 'New Pending Approval' },
450 { Description => "If an approval is rejected, reject the original and delete pending approvals", # loc
451 Queue => '___Approvals',
452 ScripCondition => 'On Status Change',
453 ScripAction => 'User Defined',
454 CustomPrepareCode => q[
455 # ------------------------------------------------------------------- #
456 return(0) unless ( lc($self->TransactionObj->NewValue) eq "rejected" or
457 lc($self->TransactionObj->NewValue) eq "deleted" );
460 my $links = $self->TicketObj->DependedOnBy;
461 foreach my $link (@{ $links->ItemsArrayRef }) {
462 my $obj = $link->BaseObj;
463 if ($obj->QueueObj->IsActiveStatus($obj->Status)) {
464 if ($obj->Type eq 'ticket') {
466 Content => $self->loc("Your request was rejected."),
469 Status => 'rejected',
473 $T::Approval = $self->TicketObj; # so we can access it inside templates
474 $self->{TicketObj} = $obj; # we want the original id in the token line
486 $links = $self->TicketObj->DependsOn;
487 foreach my $link (@{ $links->ItemsArrayRef }) {
488 my $obj = $link->TargetObj;
489 if ($obj->QueueObj->IsActiveStatus($obj->Status)) {
497 # Now magically turn myself into a Requestor Notify object...
498 require RT::Action::Notify; bless($self, 'RT::Action::Notify');
499 $self->{Argument} = 'Requestor'; $self->Prepare;
502 # ------------------------------------------------------------------- #
504 CustomCommitCode => '"never needed"',
505 Template => 'Approval Rejected', },
506 { Description => "When a ticket has been approved by any approver, add correspondence to the original ticket", # loc
507 Queue => '___Approvals',
508 ScripCondition => 'On Resolve',
509 ScripAction => 'User Defined',
510 CustomPrepareCode => q[
511 # ------------------------------------------------------------------- #
512 return(0) unless ($self->TicketObj->Type eq 'approval');
515 my $t = $self->TicketObj->Transactions;
516 while (my $o = $t->Next) {
517 $note .= $o->Content . "\n" if $o->ContentObj
518 and $o->Content !~ /Default Approval/;
521 foreach my $obj ($self->TicketObj->AllDependedOnBy( Type => 'ticket' )) {
523 Content => $self->loc( "Your request has been approved by [_1]. Other approvals may still be pending.", # loc
524 $self->TransactionObj->CreatorObj->Name,
525 ) . "\n" . $self->loc( "Approver's notes: [_1]", # loc
529 $T::Approval = $self->TicketObj; # so we can access it inside templates
530 $self->{TicketObj} = $obj; # we want the original id in the token line
533 # Now magically turn myself into a Requestor Notify object...
534 require RT::Action::Notify; bless($self, 'RT::Action::Notify');
535 $self->{Argument} = 'Requestor'; $self->Prepare;
538 # ------------------------------------------------------------------- #
540 CustomCommitCode => '"never needed"',
541 Template => 'Approval Passed' },
542 { Description => "When a ticket has been approved by all approvers, add correspondence to the original ticket", # loc
543 Queue => '___Approvals',
544 ScripCondition => 'On Resolve',
545 ScripAction => 'User Defined',
546 CustomPrepareCode => q[
547 # ------------------------------------------------------------------- #
548 # Find all the tickets that depend on this (that this is approving)
550 my $Ticket = $self->TicketObj;
551 my @TOP = $Ticket->AllDependedOnBy( Type => 'ticket' );
552 my $links = $Ticket->DependedOnBy;
555 while (my $link = $links->Next) {
556 my $obj = $link->BaseObj;
557 next if ($obj->HasUnresolvedDependencies( Type => 'approval' ));
559 if ($obj->Type eq 'ticket') {
561 Content => $self->loc("Your request has been approved."),
563 $T::Approval = $Ticket; # so we can access it inside templates
564 $self->{TicketObj} = $obj; # we want the original id in the token line
567 elsif ($obj->Type eq 'approval') {
568 $obj->SetStatus( Status => 'open', Force => 1 );
570 elsif ($RT::UseCodeTickets and $obj->Type eq 'code') {
571 my $code = $obj->Transactions->First->Content;
574 foreach my $TOP (@TOP) {
577 $RT::Logger->error("Cannot eval code: $@") if $@;
581 $obj->SetStatus( Status => 'resolved', Force => 1,);
584 $obj->SetStatus( Status => 'rejected', Force => 1,);
589 # Now magically turn myself into a Requestor Notify object...
590 require RT::Action::Notify; bless($self, 'RT::Action::Notify');
591 $self->{Argument} = 'Requestor'; $self->Prepare;
593 return 0; # ignore $passed;
594 # ------------------------------------------------------------------- #
596 CustomCommitCode => '"never needed"',
597 Template => 'All Approvals Passed', },
602 { UserId => 'Nobody', # - principalId
603 Right => 'OwnTicket', },
605 { UserId => 'root', # - principalid
606 Right => 'SuperUser', },
610 # Predefined searches
613 { Name => 'Search - My Tickets',
614 Description => '[_1] highest priority tickets I own', # loc
616 { 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",
617 Query => " Owner = '__CurrentUser__' AND ( Status = 'new' OR Status = 'open')",
618 OrderBy => 'Priority',
621 { Name => 'Search - Unowned Tickets',
622 Description => '[_1] newest unowned tickets', # loc
625 { 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: ' ",
626 Query => " Owner = 'Nobody' AND ( Status = 'new' OR Status = 'open')",
627 OrderBy => 'Created',
630 { Name => 'HomepageSettings',
631 Description => 'HomepageSettings',
634 [ { type => 'system', name => 'My Tickets' },
635 { type => 'system', name => 'Unowned Tickets' },
636 { type => 'component', name => 'QuickCreate'},
640 { type => 'component', name => 'MyReminders' },
641 { type => 'component', name => 'Quicksearch' },
642 { type => 'component', name => 'RefreshHomepage' },