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.
349 { Queue => '___Approvals',
350 Name => "New Pending Approval", # loc
352 "Notify Owners and AdminCcs of new items pending their approval", # loc
353 Content => 'Subject: New Pending Approval: {$Ticket->Subject}
357 There is a new item pending your approval: "{$Ticket->Subject()}",
358 a summary of which appears below.
360 Please visit {$RT::WebURL}Approvals/Display.html?id={$Ticket->id}
361 to approve or reject this ticket, or {$RT::WebURL}Approvals/ to
362 batch-process all your pending approvals.
364 -------------------------------------------------------------------------
365 {$Transaction->Content()}
368 { Queue => '___Approvals',
369 Name => "Approval Passed", # loc
371 "Notify Owner of their ticket has been approved by some approver", # loc
372 Content => 'Subject: Ticket Approved: {$Ticket->Subject}
376 Your ticket has been approved by { eval { $Approval->OwnerObj->Name } }.
377 Other approvals may be pending.
380 { Queue => '___Approvals',
381 Name => "All Approvals Passed", # loc
383 "Notify Owner of their ticket has been approved by all approvers", # loc
384 Content => 'Subject: Ticket Approved: {$Ticket->Subject}
388 Your ticket has been approved. Its Owner may now start to act on it.
391 { Queue => '___Approvals',
392 Name => "Approval Rejected", # loc
394 "Notify Owner of their rejected ticket", # loc
395 Content => 'Subject: Ticket Rejected: {$Ticket->Subject}
399 Your ticket has been rejected by { eval { $Approval->OwnerObj->Name } }.
406 { ScripCondition => 'On Correspond',
407 ScripAction => 'Open Tickets',
408 Template => 'Blank' },
409 { ScripCondition => 'On Owner Change',
410 ScripAction => 'Notify Owner',
411 Template => 'Transaction' },
412 { ScripCondition => 'On Create',
413 ScripAction => 'AutoReply To Requestors',
414 Template => 'AutoReply' },
415 { ScripCondition => 'On Create',
416 ScripAction => 'Notify AdminCcs',
417 Template => 'Transaction' },
418 { ScripCondition => 'On Correspond',
419 ScripAction => 'Notify AdminCcs',
420 Template => 'Admin Correspondence' },
421 { ScripCondition => 'On Correspond',
422 ScripAction => 'Notify Requestors And Ccs',
423 Template => 'Correspondence' },
424 { ScripCondition => 'On Correspond',
425 ScripAction => 'Notify Other Recipients',
426 Template => 'Correspondence' },
427 { ScripCondition => 'On Comment',
428 ScripAction => 'Notify AdminCcs As Comment',
429 Template => 'Admin Comment' },
430 { ScripCondition => 'On Comment',
431 ScripAction => 'Notify Other Recipients As Comment',
432 Template => 'Correspondence' },
433 { ScripCondition => 'On Resolve',
434 ScripAction => 'Notify Requestors',
435 Template => 'Resolved' },
436 { Description => "When an approval ticket is created, notify the Owner and AdminCc of the item awaiting their approval", # loc
437 Queue => '___Approvals',
438 ScripCondition => 'User Defined',
439 CustomIsApplicableCode => q[
440 $self->TicketObj->Type eq 'approval' and
441 $self->TransactionObj->Field eq 'Status' and
442 $self->TransactionObj->NewValue eq 'open' and
443 eval { $T::Approving = ($self->TicketObj->AllDependedOnBy( Type => 'ticket' ))[0] }
445 ScripAction => 'Notify Owner',
446 Template => 'New Pending Approval' },
447 { Description => "If an approval is rejected, reject the original and delete pending approvals", # loc
448 Queue => '___Approvals',
449 ScripCondition => 'On Status Change',
450 ScripAction => 'User Defined',
451 CustomPrepareCode => q[
452 # ------------------------------------------------------------------- #
453 return(0) unless ( lc($self->TransactionObj->NewValue) eq "rejected" or
454 lc($self->TransactionObj->NewValue) eq "deleted" );
457 my $links = $self->TicketObj->DependedOnBy;
458 foreach my $link (@{ $links->ItemsArrayRef }) {
459 my $obj = $link->BaseObj;
460 if ($obj->QueueObj->IsActiveStatus($obj->Status)) {
461 if ($obj->Type eq 'ticket') {
463 Content => $self->loc("Your request was rejected."),
466 Status => 'rejected',
470 $T::Approval = $self->TicketObj; # so we can access it inside templates
471 $self->{TicketObj} = $obj; # we want the original id in the token line
483 $links = $self->TicketObj->DependsOn;
484 foreach my $link (@{ $links->ItemsArrayRef }) {
485 my $obj = $link->TargetObj;
486 if ($obj->QueueObj->IsActiveStatus($obj->Status)) {
494 # Now magically turn myself into a Requestor Notify object...
495 require RT::Action::Notify; bless($self, 'RT::Action::Notify');
496 $self->{Argument} = 'Requestor'; $self->Prepare;
499 # ------------------------------------------------------------------- #
501 CustomCommitCode => '"never needed"',
502 Template => 'Approval Rejected', },
503 { Description => "When a ticket has been approved by any approver, add correspondence to the original ticket", # loc
504 Queue => '___Approvals',
505 ScripCondition => 'On Resolve',
506 ScripAction => 'User Defined',
507 CustomPrepareCode => q[
508 # ------------------------------------------------------------------- #
509 return(0) unless ($self->TicketObj->Type eq 'approval');
512 my $t = $self->TicketObj->Transactions;
513 while (my $o = $t->Next) {
514 $note .= $o->Content . "\n" if $o->ContentObj
515 and $o->Content !~ /Default Approval/;
518 foreach my $obj ($self->TicketObj->AllDependedOnBy( Type => 'ticket' )) {
520 Content => $self->loc( "Your request has been approved by [_1]. Other approvals may still be pending.", # loc
521 $self->TransactionObj->CreatorObj->Name,
522 ) . "\n" . $self->loc( "Approver's notes: [_1]", # loc
526 $T::Approval = $self->TicketObj; # so we can access it inside templates
527 $self->{TicketObj} = $obj; # we want the original id in the token line
530 # Now magically turn myself into a Requestor Notify object...
531 require RT::Action::Notify; bless($self, 'RT::Action::Notify');
532 $self->{Argument} = 'Requestor'; $self->Prepare;
535 # ------------------------------------------------------------------- #
537 CustomCommitCode => '"never needed"',
538 Template => 'Approval Passed' },
539 { Description => "When a ticket has been approved by all approvers, add correspondence to the original ticket", # loc
540 Queue => '___Approvals',
541 ScripCondition => 'On Resolve',
542 ScripAction => 'User Defined',
543 CustomPrepareCode => q[
544 # ------------------------------------------------------------------- #
545 # Find all the tickets that depend on this (that this is approving)
547 my $Ticket = $self->TicketObj;
548 my @TOP = $Ticket->AllDependedOnBy( Type => 'ticket' );
549 my $links = $Ticket->DependedOnBy;
552 while (my $link = $links->Next) {
553 my $obj = $link->BaseObj;
554 next if ($obj->HasUnresolvedDependencies( Type => 'approval' ));
556 if ($obj->Type eq 'ticket') {
558 Content => $self->loc("Your request has been approved."),
560 $T::Approval = $Ticket; # so we can access it inside templates
561 $self->{TicketObj} = $obj; # we want the original id in the token line
564 elsif ($obj->Type eq 'approval') {
565 $obj->SetStatus( Status => 'open', Force => 1 );
567 elsif ($RT::UseCodeTickets and $obj->Type eq 'code') {
568 my $code = $obj->Transactions->First->Content;
571 foreach my $TOP (@TOP) {
574 $RT::Logger->error("Cannot eval code: $@") if $@;
578 $obj->SetStatus( Status => 'resolved', Force => 1,);
581 $obj->SetStatus( Status => 'rejected', Force => 1,);
586 # Now magically turn myself into a Requestor Notify object...
587 require RT::Action::Notify; bless($self, 'RT::Action::Notify');
588 $self->{Argument} = 'Requestor'; $self->Prepare;
590 return 0; # ignore $passed;
591 # ------------------------------------------------------------------- #
593 CustomCommitCode => '"never needed"',
594 Template => 'All Approvals Passed', },
599 { UserId => 'Nobody', # - principalId
600 Right => 'OwnTicket', },
602 { UserId => 'root', # - principalid
603 Right => 'SuperUser', },
607 # Predefined searches
610 { Name => 'Search - My Tickets',
611 Description => '[_1] highest priority tickets I own', # loc
613 { 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",
614 Query => " Owner = '__CurrentUser__' AND ( Status = 'new' OR Status = 'open')",
615 OrderBy => 'Priority',
618 { Name => 'Search - Unowned Tickets',
619 Description => '[_1] newest unowned tickets', # loc
622 { 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: ' ",
623 Query => " Owner = 'Nobody' AND ( Status = 'new' OR Status = 'open')",
624 OrderBy => 'Created',
627 { Name => 'HomepageSettings',
628 Description => 'HomepageSettings',
631 [ { type => 'system', name => 'My Tickets' },
632 { type => 'system', name => 'Unowned Tickets' },
633 { type => 'component', name => 'QuickCreate'},
637 { type => 'component', name => 'MyReminders' },
638 { type => 'component', name => 'Quicksearch' },
639 { type => 'component', name => 'RefreshHomepage' },