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 => 'General',
63 Description => 'The default queue',
64 CorrespondAddress => "",
65 CommentAddress => "", },
66 { Name => '___Approvals',
67 Description => 'A system-internal queue for the approvals system',
72 { Name => 'Autoreply To Requestors', # loc
74 'Always sends a message to the requestors independent of message sender' , # loc
75 ExecModule => 'Autoreply',
76 Argument => 'Requestor' },
77 { Name => 'Notify Requestors', # loc
78 Description => 'Sends a message to the requestors', # loc
79 ExecModule => 'Notify',
80 Argument => 'Requestor' },
81 { Name => 'Notify Owner as Comment', # loc
82 Description => 'Sends mail to the owner', # loc
83 ExecModule => 'NotifyAsComment',
84 Argument => 'Owner' },
85 { Name => 'Notify Owner', # loc
86 Description => 'Sends mail to the owner', # loc
87 ExecModule => 'Notify',
88 Argument => 'Owner' },
89 { Name => 'Notify Ccs as Comment', # loc
90 Description => 'Sends mail to the Ccs as a comment', # loc
91 ExecModule => 'NotifyAsComment',
93 { Name => 'Notify Ccs', # loc
94 Description => 'Sends mail to the Ccs', # loc
95 ExecModule => 'Notify',
97 { Name => 'Notify AdminCcs as Comment', # loc
98 Description => 'Sends mail to the administrative Ccs as a comment', # loc
99 ExecModule => 'NotifyAsComment',
100 Argument => 'AdminCc' },
101 { Name => 'Notify AdminCcs', # loc
102 Description => 'Sends mail to the administrative Ccs', # loc
103 ExecModule => 'Notify',
104 Argument => 'AdminCc' },
106 { Name => 'Notify Requestors and Ccs as Comment', # loc
107 Description => 'Send mail to requestors and Ccs as a comment', # loc
108 ExecModule => 'NotifyAsComment',
109 Argument => 'Requestor,Cc' },
111 { Name => 'Notify Requestors and Ccs', # loc
112 Description => 'Send mail to requestors and Ccs', # loc
113 ExecModule => 'Notify',
114 Argument => 'Requestor,Cc' },
116 { Name => 'Notify Requestors, Ccs and AdminCcs as Comment', # loc
117 Description => 'Send mail to all watchers as a "comment"', # loc
118 ExecModule => 'NotifyAsComment',
120 { Name => 'Notify Requestors, Ccs and AdminCcs', # loc
121 Description => 'Send mail to all watchers', # loc
122 ExecModule => 'Notify',
124 { Name => 'Notify Other Recipients as Comment', # loc
125 Description => 'Sends mail to explicitly listed Ccs and Bccs', # loc
126 ExecModule => 'NotifyAsComment',
127 Argument => 'OtherRecipients' },
128 { Name => 'Notify Other Recipients', # loc
129 Description => 'Sends mail to explicitly listed Ccs and Bccs', # loc
130 ExecModule => 'Notify',
131 Argument => 'OtherRecipients' },
132 { Name => 'User Defined', # loc
133 Description => 'Perform a user-defined action', # loc
134 ExecModule => 'UserDefined', },
135 { Name => 'Create Tickets', # loc
137 'Create new tickets based on this scrip\'s template', # loc
138 ExecModule => 'CreateTickets', },
139 { Name => 'Open Tickets', # loc
140 Description => 'Open tickets on correspondence', # loc
141 ExecModule => 'AutoOpen' },
145 { Name => 'On Create', # loc
146 Description => 'When a ticket is created', # loc
147 ApplicableTransTypes => 'Create',
148 ExecModule => 'AnyTransaction', },
150 { Name => 'On Transaction', # loc
151 Description => 'When anything happens', # loc
152 ApplicableTransTypes => 'Any',
153 ExecModule => 'AnyTransaction', },
156 Name => 'On Correspond', # loc
157 Description => 'Whenever correspondence comes in', # loc
158 ApplicableTransTypes => 'Correspond',
159 ExecModule => 'AnyTransaction', },
163 Name => 'On Comment', # loc
164 Description => 'Whenever comments come in', # loc
165 ApplicableTransTypes => 'Comment',
166 ExecModule => 'AnyTransaction' },
169 Name => 'On Status Change', # loc
170 Description => 'Whenever a ticket\'s status changes', # loc
171 ApplicableTransTypes => 'Status',
172 ExecModule => 'AnyTransaction',
177 Name => 'On Priority Change', # loc
178 Description => 'Whenever a ticket\'s priority changes', # loc
179 ApplicableTransTypes => 'Set',
180 ExecModule => 'PriorityChange',
184 Name => 'On Owner Change', # loc
185 Description => 'Whenever a ticket\'s owner changes', # loc
186 ApplicableTransTypes => 'Any',
187 ExecModule => 'OwnerChange',
192 Name => 'On Queue Change', # loc
193 Description => 'Whenever a ticket\'s queue changes', # loc
194 ApplicableTransTypes => 'Set',
195 ExecModule => 'QueueChange',
198 { Name => 'On Resolve', # loc
199 Description => 'Whenever a ticket is resolved', # loc
200 ApplicableTransTypes => 'Status',
201 ExecModule => 'StatusChange',
202 Argument => 'resolved'
206 { Name => 'User Defined', # loc
207 Description => 'Whenever a user-defined condition occurs', # loc
208 ApplicableTransTypes => 'Any',
209 ExecModule => 'UserDefined'
217 Name => 'Blank', # loc
218 Description => 'A blank template', # loc
221 Name => 'Autoreply', # loc
222 Description => 'Default Autoresponse template', # loc
223 Content => 'Subject: AutoReply: {$Ticket->Subject}
228 This message has been automatically generated in response to the
229 creation of a trouble ticket regarding:
230 "{$Ticket->Subject()}",
231 a summary of which appears below.
233 There is no need to reply to this message right now. Your ticket has been
234 assigned an ID of [{$rtname} #{$Ticket->id()}].
236 Please include the string:
238 [{$rtname} #{$Ticket->id}]
240 in the subject line of all future correspondence about this issue. To do so,
241 you may reply to this message.
244 {$Ticket->QueueObj->CorrespondAddress()}
246 -------------------------------------------------------------------------
247 {$Transaction->Content()}
252 Name => 'Transaction', # loc
253 Description => 'Default transaction template', # loc
254 Content => 'RT-Attach-Message: yes
257 {$Transaction->CreatedAsString}: Request {$Ticket->id} was acted upon.
258 Transaction: {$Transaction->Description}
259 Queue: {$Ticket->QueueObj->Name}
260 Subject: {$Transaction->Subject || $Ticket->Subject || "(No subject given)"}
261 Owner: {$Ticket->OwnerObj->Name}
262 Requestors: {$Ticket->RequestorAddresses}
263 Status: {$Ticket->Status}
264 Ticket <URL: {$RT::WebURL}Ticket/Display.html?id={$Ticket->id} >
267 {$Transaction->Content()}
274 Name => 'Admin Correspondence', # loc
275 Description => 'Default admin correspondence template', # loc
276 Content => 'RT-Attach-Message: yes
279 <URL: {$RT::WebURL}Ticket/Display.html?id={$Ticket->id} >
281 {$Transaction->Content()}
286 Name => 'Correspondence', # loc
287 Description => 'Default correspondence template', # loc
288 Content => 'RT-Attach-Message: yes
290 {$Transaction->Content()}
295 Name => 'Admin Comment', # loc
296 Description => 'Default admin comment template', # loc
298 'Subject: [Comment] {my $s=($Transaction->Subject||$Ticket->Subject); $s =~ s/\\[Comment\\]//g; $comment =~ s/^Re//i; $s;}
301 {$RT::WebURL}Ticket/Display.html?id={$Ticket->id}
302 This is a comment. It is not sent to the Requestor(s):
304 {$Transaction->Content()}
309 Name => 'Status Change', # loc
310 Description => 'Ticket status changed', # loc
311 Content => 'Subject: Status Changed to: {$Transaction->NewValue}
314 {$RT::WebURL}Ticket/Display.html?id={$Ticket->id}
316 {$Transaction->Content()}
323 Name => 'Resolved', # loc
324 Description => 'Ticket Resolved', # loc
325 Content => 'Subject: Resolved: {$Ticket->Subject}
327 According to our records, your request has been resolved. If you have any
328 further questions or concerns, please respond to this message.
331 { Queue => '___Approvals',
332 Name => "New Pending Approval", # loc
334 "Notify Owners and AdminCcs of new items pending their approval", # loc
335 Content => 'Subject: New Pending Approval: {$Ticket->Subject}
339 There is a new item pending your approval: "{$Ticket->Subject()}",
340 a summary of which appears below.
342 Please visit {$RT::WebURL}Approvals/Display.html?id={$Ticket->id}
343 to approve or reject this ticket, or {$RT::WebURL}Approvals/ to
344 batch-process all your pending approvals.
346 -------------------------------------------------------------------------
347 {$Transaction->Content()}
350 { Queue => '___Approvals',
351 Name => "Approval Passed", # loc
353 "Notify Owner of their ticket has been approved by some approver", # loc
354 Content => 'Subject: Ticket Approved: {$Ticket->Subject}
358 Your ticket has been approved by { eval { $Approval->OwnerObj->Name } }.
359 Other approvals may be pending.
362 { Queue => '___Approvals',
363 Name => "All Approvals Passed", # loc
365 "Notify Owner of their ticket has been approved by all approvers", # loc
366 Content => 'Subject: Ticket Approved: {$Ticket->Subject}
370 Your ticket has been approved. Its Owner may now start to act on it.
373 { Queue => '___Approvals',
374 Name => "Approval Rejected", # loc
376 "Notify Owner of their rejected ticket", # loc
377 Content => 'Subject: Ticket Rejected: {$Ticket->Subject}
381 Your ticket has been rejected by { eval { $Approval->OwnerObj->Name } }.
388 { ScripCondition => 'On Correspond',
389 ScripAction => 'Open Tickets',
390 Template => 'Blank' },
391 { ScripCondition => 'On Owner Change',
392 ScripAction => 'Notify Owner',
393 Template => 'Transaction' },
394 { ScripCondition => 'On Create',
395 ScripAction => 'AutoReply To Requestors',
396 Template => 'AutoReply' },
397 { ScripCondition => 'On Create',
398 ScripAction => 'Notify AdminCcs',
399 Template => 'Transaction' },
400 { ScripCondition => 'On Correspond',
401 ScripAction => 'Notify AdminCcs',
402 Template => 'Admin Correspondence' },
403 { ScripCondition => 'On Correspond',
404 ScripAction => 'Notify Requestors And Ccs',
405 Template => 'Correspondence' },
406 { ScripCondition => 'On Correspond',
407 ScripAction => 'Notify Other Recipients',
408 Template => 'Correspondence' },
409 { ScripCondition => 'On Comment',
410 ScripAction => 'Notify AdminCcs As Comment',
411 Template => 'Admin Comment' },
412 { ScripCondition => 'On Comment',
413 ScripAction => 'Notify Other Recipients As Comment',
414 Template => 'Correspondence' },
415 { ScripCondition => 'On Resolve',
416 ScripAction => 'Notify Requestors',
417 Template => 'Resolved' },
418 { Description => "When an approval ticket is created, notify the Owner and AdminCc of the item awaiting their approval", # loc
419 Queue => '___Approvals',
420 ScripCondition => 'User Defined',
421 CustomIsApplicableCode => q[
422 $self->TicketObj->Type eq 'approval' and
423 $self->TransactionObj->Field eq 'Status' and
424 $self->TransactionObj->NewValue eq 'open' and
425 eval { $T::Approving = ($self->TicketObj->AllDependedOnBy( Type => 'ticket' ))[0] }
427 ScripAction => 'Notify Owner',
428 Template => 'New Pending Approval' },
429 { Description => "If an approval is rejected, reject the original and delete pending approvals", # loc
430 Queue => '___Approvals',
431 ScripCondition => 'On Status Change',
432 ScripAction => 'User Defined',
433 CustomPrepareCode => q[
434 # ------------------------------------------------------------------- #
435 return(0) unless ( lc($self->TransactionObj->NewValue) eq "rejected" or
436 lc($self->TransactionObj->NewValue) eq "deleted" );
439 my $links = $self->TicketObj->DependedOnBy;
440 foreach my $link (@{ $links->ItemsArrayRef }) {
441 my $obj = $link->BaseObj;
442 if ($obj->QueueObj->IsActiveStatus($obj->Status)) {
443 if ($obj->Type eq 'ticket') {
445 Content => $self->loc("Your request was rejected."),
448 Status => 'rejected',
452 $T::Approval = $self->TicketObj; # so we can access it inside templates
453 $self->{TicketObj} = $obj; # we want the original id in the token line
465 $links = $self->TicketObj->DependsOn;
466 foreach my $link (@{ $links->ItemsArrayRef }) {
467 my $obj = $link->TargetObj;
468 if ($obj->QueueObj->IsActiveStatus($obj->Status)) {
476 # Now magically turn myself into a Requestor Notify object...
477 require RT::Action::Notify; bless($self, 'RT::Action::Notify');
478 $self->{Argument} = 'Requestor'; $self->Prepare;
481 # ------------------------------------------------------------------- #
483 CustomCommitCode => '"never needed"',
484 Template => 'Approval Rejected', },
485 { Description => "When a ticket has been approved by any approver, add correspondence to the original ticket", # loc
486 Queue => '___Approvals',
487 ScripCondition => 'On Resolve',
488 ScripAction => 'User Defined',
489 CustomPrepareCode => q[
490 # ------------------------------------------------------------------- #
491 return(0) unless ($self->TicketObj->Type eq 'approval');
494 my $t = $self->TicketObj->Transactions;
495 while (my $o = $t->Next) {
496 $note .= $o->Content . "\n" if $o->ContentObj
497 and $o->Content !~ /Default Approval/;
500 foreach my $obj ($self->TicketObj->AllDependedOnBy( Type => 'ticket' )) {
502 Content => $self->loc( "Your request has been approved by [_1]. Other approvals may still be pending.", # loc
503 $self->TransactionObj->CreatorObj->Name,
504 ) . "\n" . $self->loc( "Approver's notes: [_1]", # loc
508 $T::Approval = $self->TicketObj; # so we can access it inside templates
509 $self->{TicketObj} = $obj; # we want the original id in the token line
512 # Now magically turn myself into a Requestor Notify object...
513 require RT::Action::Notify; bless($self, 'RT::Action::Notify');
514 $self->{Argument} = 'Requestor'; $self->Prepare;
517 # ------------------------------------------------------------------- #
519 CustomCommitCode => '"never needed"',
520 Template => 'Approval Passed' },
521 { Description => "When a ticket has been approved by all approvers, add correspondence to the original ticket", # loc
522 Queue => '___Approvals',
523 ScripCondition => 'On Resolve',
524 ScripAction => 'User Defined',
525 CustomPrepareCode => q[
526 # ------------------------------------------------------------------- #
527 # Find all the tickets that depend on this (that this is approving)
529 my $Ticket = $self->TicketObj;
530 my @TOP = $Ticket->AllDependedOnBy( Type => 'ticket' );
531 my $links = $Ticket->DependedOnBy;
534 while (my $link = $links->Next) {
535 my $obj = $link->BaseObj;
536 next if ($obj->HasUnresolvedDependencies( Type => 'approval' ));
538 if ($obj->Type eq 'ticket') {
540 Content => $self->loc("Your request has been approved."),
542 $T::Approval = $Ticket; # so we can access it inside templates
543 $self->{TicketObj} = $obj; # we want the original id in the token line
546 elsif ($obj->Type eq 'approval') {
547 $obj->SetStatus( Status => 'open', Force => 1 );
549 elsif ($RT::UseCodeTickets and $obj->Type eq 'code') {
550 my $code = $obj->Transactions->First->Content;
553 foreach my $TOP (@TOP) {
556 $RT::Logger->error("Cannot eval code: $@") if $@;
560 $obj->SetStatus( Status => 'resolved', Force => 1,);
563 $obj->SetStatus( Status => 'rejected', Force => 1,);
568 # Now magically turn myself into a Requestor Notify object...
569 require RT::Action::Notify; bless($self, 'RT::Action::Notify');
570 $self->{Argument} = 'Requestor'; $self->Prepare;
572 return 0; # ignore $passed;
573 # ------------------------------------------------------------------- #
575 CustomCommitCode => '"never needed"',
576 Template => 'All Approvals Passed', },
581 { UserId => 'Nobody', # - principalId
582 Right => 'OwnTicket', },
584 { UserId => 'root', # - principalid
585 Right => 'SuperUser', },
589 # Predefined searches
592 { Name => 'Search - My Tickets',
593 Description => '[_1] highest priority tickets I own', # loc
595 { 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",
596 Query => " Owner = '__CurrentUser__' AND ( Status = 'new' OR Status = 'open')",
597 OrderBy => 'Priority',
600 { Name => 'Search - Unowned Tickets',
601 Description => '[_1] newest unowned tickets', # loc
604 { 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: ' ",
605 Query => " Owner = 'Nobody' AND ( Status = 'new' OR Status = 'open')",
606 OrderBy => 'Created',
609 { Name => 'HomepageSettings',
610 Description => 'HomepageSettings',
613 [ { type => 'system', name => 'My Tickets' },
614 { type => 'system', name => 'Unowned Tickets' },
615 { type => 'component', name => 'QuickCreate'},
619 { type => 'component', name => 'MyReminders' },
620 { type => 'component', name => 'Quicksearch' },
621 { type => 'component', name => 'RefreshHomepage' },