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 => '', },
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}
244 This message has been automatically generated in response to the
245 creation of a trouble ticket regarding:
246 "{$Ticket->Subject()}",
247 a summary of which appears below.
249 There is no need to reply to this message right now. Your ticket has been
250 assigned an ID of [{$rtname} #{$Ticket->id()}].
252 Please include the string:
254 [{$rtname} #{$Ticket->id}]
256 in the subject line of all future correspondence about this issue. To do so,
257 you may reply to this message.
260 {$Ticket->QueueObj->CorrespondAddress()}
262 -------------------------------------------------------------------------
263 {$Transaction->Content()}
268 Name => 'Transaction', # loc
269 Description => 'Default transaction template', # loc
270 Content => 'RT-Attach-Message: yes
273 {$Transaction->CreatedAsString}: Request {$Ticket->id} was acted upon.
274 Transaction: {$Transaction->Description}
275 Queue: {$Ticket->QueueObj->Name}
276 Subject: {$Transaction->Subject || $Ticket->Subject || "(No subject given)"}
277 Owner: {$Ticket->OwnerObj->Name}
278 Requestors: {$Ticket->RequestorAddresses}
279 Status: {$Ticket->Status}
280 Ticket <URL: {$RT::WebURL}Ticket/Display.html?id={$Ticket->id} >
283 {$Transaction->Content()}
290 Name => 'Admin Correspondence', # loc
291 Description => 'Default admin correspondence template', # loc
292 Content => 'RT-Attach-Message: yes
295 <URL: {$RT::WebURL}Ticket/Display.html?id={$Ticket->id} >
297 {$Transaction->Content()}
302 Name => 'Correspondence', # loc
303 Description => 'Default correspondence template', # loc
304 Content => 'RT-Attach-Message: yes
306 {$Transaction->Content()}
311 Name => 'Admin Comment', # loc
312 Description => 'Default admin comment template', # loc
314 'Subject: [Comment] {my $s=($Transaction->Subject||$Ticket->Subject); $s =~ s/\\[Comment\\]//g; $comment =~ s/^Re//i; $s;}
317 {$RT::WebURL}Ticket/Display.html?id={$Ticket->id}
318 This is a comment. It is not sent to the Requestor(s):
320 {$Transaction->Content()}
325 Name => 'Status Change', # loc
326 Description => 'Ticket status changed', # loc
327 Content => 'Subject: Status Changed to: {$Transaction->NewValue}
330 {$RT::WebURL}Ticket/Display.html?id={$Ticket->id}
332 {$Transaction->Content()}
339 Name => 'Resolved', # loc
340 Description => 'Ticket Resolved', # loc
341 Content => 'Subject: Resolved: {$Ticket->Subject}
343 According to our records, your request has been resolved. If you have any
344 further questions or concerns, please respond to this message.
347 { Queue => '___Approvals',
348 Name => "New Pending Approval", # loc
350 "Notify Owners and AdminCcs of new items pending their approval", # loc
351 Content => 'Subject: New Pending Approval: {$Ticket->Subject}
355 There is a new item pending your approval: "{$Ticket->Subject()}",
356 a summary of which appears below.
358 Please visit {$RT::WebURL}Approvals/Display.html?id={$Ticket->id}
359 to approve or reject this ticket, or {$RT::WebURL}Approvals/ to
360 batch-process all your pending approvals.
362 -------------------------------------------------------------------------
363 {$Transaction->Content()}
366 { Queue => '___Approvals',
367 Name => "Approval Passed", # loc
369 "Notify Owner of their ticket has been approved by some approver", # loc
370 Content => 'Subject: Ticket Approved: {$Ticket->Subject}
374 Your ticket has been approved by { eval { $Approval->OwnerObj->Name } }.
375 Other approvals may be pending.
378 { Queue => '___Approvals',
379 Name => "All Approvals Passed", # loc
381 "Notify Owner of their ticket has been approved by all approvers", # loc
382 Content => 'Subject: Ticket Approved: {$Ticket->Subject}
386 Your ticket has been approved. Its Owner may now start to act on it.
389 { Queue => '___Approvals',
390 Name => "Approval Rejected", # loc
392 "Notify Owner of their rejected ticket", # loc
393 Content => 'Subject: Ticket Rejected: {$Ticket->Subject}
397 Your ticket has been rejected by { eval { $Approval->OwnerObj->Name } }.
404 { ScripCondition => 'On Correspond',
405 ScripAction => 'Open Tickets',
406 Template => 'Blank' },
407 { ScripCondition => 'On Owner Change',
408 ScripAction => 'Notify Owner',
409 Template => 'Transaction' },
410 { ScripCondition => 'On Create',
411 ScripAction => 'AutoReply To Requestors',
412 Template => 'AutoReply' },
413 { ScripCondition => 'On Create',
414 ScripAction => 'Notify AdminCcs',
415 Template => 'Transaction' },
416 { ScripCondition => 'On Correspond',
417 ScripAction => 'Notify AdminCcs',
418 Template => 'Admin Correspondence' },
419 { ScripCondition => 'On Correspond',
420 ScripAction => 'Notify Requestors And Ccs',
421 Template => 'Correspondence' },
422 { ScripCondition => 'On Correspond',
423 ScripAction => 'Notify Other Recipients',
424 Template => 'Correspondence' },
425 { ScripCondition => 'On Comment',
426 ScripAction => 'Notify AdminCcs As Comment',
427 Template => 'Admin Comment' },
428 { ScripCondition => 'On Comment',
429 ScripAction => 'Notify Other Recipients As Comment',
430 Template => 'Correspondence' },
431 { ScripCondition => 'On Resolve',
432 ScripAction => 'Notify Requestors',
433 Template => 'Resolved' },
434 { Description => "When an approval ticket is created, notify the Owner and AdminCc of the item awaiting their approval", # loc
435 Queue => '___Approvals',
436 ScripCondition => 'User Defined',
437 CustomIsApplicableCode => q[
438 $self->TicketObj->Type eq 'approval' and
439 $self->TransactionObj->Field eq 'Status' and
440 $self->TransactionObj->NewValue eq 'open' and
441 eval { $T::Approving = ($self->TicketObj->AllDependedOnBy( Type => 'ticket' ))[0] }
443 ScripAction => 'Notify Owner',
444 Template => 'New Pending Approval' },
445 { Description => "If an approval is rejected, reject the original and delete pending approvals", # loc
446 Queue => '___Approvals',
447 ScripCondition => 'On Status Change',
448 ScripAction => 'User Defined',
449 CustomPrepareCode => q[
450 # ------------------------------------------------------------------- #
451 return(0) unless ( lc($self->TransactionObj->NewValue) eq "rejected" or
452 lc($self->TransactionObj->NewValue) eq "deleted" );
455 my $links = $self->TicketObj->DependedOnBy;
456 foreach my $link (@{ $links->ItemsArrayRef }) {
457 my $obj = $link->BaseObj;
458 if ($obj->QueueObj->IsActiveStatus($obj->Status)) {
459 if ($obj->Type eq 'ticket') {
461 Content => $self->loc("Your request was rejected."),
464 Status => 'rejected',
468 $T::Approval = $self->TicketObj; # so we can access it inside templates
469 $self->{TicketObj} = $obj; # we want the original id in the token line
481 $links = $self->TicketObj->DependsOn;
482 foreach my $link (@{ $links->ItemsArrayRef }) {
483 my $obj = $link->TargetObj;
484 if ($obj->QueueObj->IsActiveStatus($obj->Status)) {
492 # Now magically turn myself into a Requestor Notify object...
493 require RT::Action::Notify; bless($self, 'RT::Action::Notify');
494 $self->{Argument} = 'Requestor'; $self->Prepare;
497 # ------------------------------------------------------------------- #
499 CustomCommitCode => '"never needed"',
500 Template => 'Approval Rejected', },
501 { Description => "When a ticket has been approved by any approver, add correspondence to the original ticket", # loc
502 Queue => '___Approvals',
503 ScripCondition => 'On Resolve',
504 ScripAction => 'User Defined',
505 CustomPrepareCode => q[
506 # ------------------------------------------------------------------- #
507 return(0) unless ($self->TicketObj->Type eq 'approval');
510 my $t = $self->TicketObj->Transactions;
511 while (my $o = $t->Next) {
512 $note .= $o->Content . "\n" if $o->ContentObj
513 and $o->Content !~ /Default Approval/;
516 foreach my $obj ($self->TicketObj->AllDependedOnBy( Type => 'ticket' )) {
518 Content => $self->loc( "Your request has been approved by [_1]. Other approvals may still be pending.", # loc
519 $self->TransactionObj->CreatorObj->Name,
520 ) . "\n" . $self->loc( "Approver's notes: [_1]", # loc
524 $T::Approval = $self->TicketObj; # so we can access it inside templates
525 $self->{TicketObj} = $obj; # we want the original id in the token line
528 # Now magically turn myself into a Requestor Notify object...
529 require RT::Action::Notify; bless($self, 'RT::Action::Notify');
530 $self->{Argument} = 'Requestor'; $self->Prepare;
533 # ------------------------------------------------------------------- #
535 CustomCommitCode => '"never needed"',
536 Template => 'Approval Passed' },
537 { Description => "When a ticket has been approved by all approvers, add correspondence to the original ticket", # loc
538 Queue => '___Approvals',
539 ScripCondition => 'On Resolve',
540 ScripAction => 'User Defined',
541 CustomPrepareCode => q[
542 # ------------------------------------------------------------------- #
543 # Find all the tickets that depend on this (that this is approving)
545 my $Ticket = $self->TicketObj;
546 my @TOP = $Ticket->AllDependedOnBy( Type => 'ticket' );
547 my $links = $Ticket->DependedOnBy;
550 while (my $link = $links->Next) {
551 my $obj = $link->BaseObj;
552 next if ($obj->HasUnresolvedDependencies( Type => 'approval' ));
554 if ($obj->Type eq 'ticket') {
556 Content => $self->loc("Your request has been approved."),
558 $T::Approval = $Ticket; # so we can access it inside templates
559 $self->{TicketObj} = $obj; # we want the original id in the token line
562 elsif ($obj->Type eq 'approval') {
563 $obj->SetStatus( Status => 'open', Force => 1 );
565 elsif ($RT::UseCodeTickets and $obj->Type eq 'code') {
566 my $code = $obj->Transactions->First->Content;
569 foreach my $TOP (@TOP) {
572 $RT::Logger->error("Cannot eval code: $@") if $@;
576 $obj->SetStatus( Status => 'resolved', Force => 1,);
579 $obj->SetStatus( Status => 'rejected', Force => 1,);
584 # Now magically turn myself into a Requestor Notify object...
585 require RT::Action::Notify; bless($self, 'RT::Action::Notify');
586 $self->{Argument} = 'Requestor'; $self->Prepare;
588 return 0; # ignore $passed;
589 # ------------------------------------------------------------------- #
591 CustomCommitCode => '"never needed"',
592 Template => 'All Approvals Passed', },
597 { UserId => 'Nobody', # - principalId
598 Right => 'OwnTicket', },
600 { UserId => 'root', # - principalid
601 Right => 'SuperUser', },
605 # Predefined searches
608 { Name => 'Search - My Tickets',
609 Description => '[_1] highest priority tickets I own', # loc
611 { 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",
612 Query => " Owner = '__CurrentUser__' AND ( Status = 'new' OR Status = 'open')",
613 OrderBy => 'Priority',
616 { Name => 'Search - Unowned Tickets',
617 Description => '[_1] newest unowned tickets', # loc
620 { 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: ' ",
621 Query => " Owner = 'Nobody' AND ( Status = 'new' OR Status = 'open')",
622 OrderBy => 'Created',
625 { Name => 'HomepageSettings',
626 Description => 'HomepageSettings',
629 [ { type => 'system', name => 'My Tickets' },
630 { type => 'system', name => 'Unowned Tickets' },
631 { type => 'component', name => 'QuickCreate'},
635 { type => 'component', name => 'MyReminders' },
636 { type => 'component', name => 'Quicksearch' },
637 { type => 'component', name => 'RefreshHomepage' },