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 => '', },
67 { Name => '___Approvals',
68 Description => 'A system-internal queue for the approvals system',
73 { Name => 'Autoreply To Requestors', # loc
75 'Always sends a message to the requestors independent of message sender' , # loc
76 ExecModule => 'Autoreply',
77 Argument => 'Requestor' },
78 { Name => 'Notify Requestors', # loc
79 Description => 'Sends a message to the requestors', # loc
80 ExecModule => 'Notify',
81 Argument => 'Requestor' },
82 { Name => 'Notify Owner as Comment', # loc
83 Description => 'Sends mail to the owner', # loc
84 ExecModule => 'NotifyAsComment',
85 Argument => 'Owner' },
86 { Name => 'Notify Owner', # loc
87 Description => 'Sends mail to the owner', # loc
88 ExecModule => 'Notify',
89 Argument => 'Owner' },
90 { Name => 'Notify Ccs as Comment', # loc
91 Description => 'Sends mail to the Ccs as a comment', # loc
92 ExecModule => 'NotifyAsComment',
94 { Name => 'Notify Ccs', # loc
95 Description => 'Sends mail to the Ccs', # loc
96 ExecModule => 'Notify',
98 { Name => 'Notify AdminCcs as Comment', # loc
99 Description => 'Sends mail to the administrative Ccs as a comment', # loc
100 ExecModule => 'NotifyAsComment',
101 Argument => 'AdminCc' },
102 { Name => 'Notify AdminCcs', # loc
103 Description => 'Sends mail to the administrative Ccs', # loc
104 ExecModule => 'Notify',
105 Argument => 'AdminCc' },
107 { Name => 'Notify Requestors and Ccs as Comment', # loc
108 Description => 'Send mail to requestors and Ccs as a comment', # loc
109 ExecModule => 'NotifyAsComment',
110 Argument => 'Requestor,Cc' },
112 { Name => 'Notify Requestors and Ccs', # loc
113 Description => 'Send mail to requestors and Ccs', # loc
114 ExecModule => 'Notify',
115 Argument => 'Requestor,Cc' },
117 { Name => 'Notify Requestors, Ccs and AdminCcs as Comment', # loc
118 Description => 'Send mail to all watchers as a "comment"', # loc
119 ExecModule => 'NotifyAsComment',
121 { Name => 'Notify Requestors, Ccs and AdminCcs', # loc
122 Description => 'Send mail to all watchers', # loc
123 ExecModule => 'Notify',
125 { Name => 'Notify Other Recipients as Comment', # loc
126 Description => 'Sends mail to explicitly listed Ccs and Bccs', # loc
127 ExecModule => 'NotifyAsComment',
128 Argument => 'OtherRecipients' },
129 { Name => 'Notify Other Recipients', # loc
130 Description => 'Sends mail to explicitly listed Ccs and Bccs', # loc
131 ExecModule => 'Notify',
132 Argument => 'OtherRecipients' },
133 { Name => 'User Defined', # loc
134 Description => 'Perform a user-defined action', # loc
135 ExecModule => 'UserDefined', },
136 { Name => 'Create Tickets', # loc
138 'Create new tickets based on this scrip\'s template', # loc
139 ExecModule => 'CreateTickets', },
140 { Name => 'Open Tickets',
141 Description => 'Open tickets on correspondence', # loc
142 ExecModule => 'AutoOpen' },
146 { Name => 'On Create', # loc
147 Description => 'When a ticket is created', # loc
148 ApplicableTransTypes => 'Create',
149 ExecModule => 'AnyTransaction', },
151 { Name => 'On Transaction', # loc
152 Description => 'When anything happens', # loc
153 ApplicableTransTypes => 'Any',
154 ExecModule => 'AnyTransaction', },
157 Name => 'On Correspond', # loc
158 Description => 'Whenever correspondence comes in', # loc
159 ApplicableTransTypes => 'Correspond',
160 ExecModule => 'AnyTransaction', },
164 Name => 'On Comment', # loc
165 Description => 'Whenever comments come in', # loc
166 ApplicableTransTypes => 'Comment',
167 ExecModule => 'AnyTransaction' },
170 Name => 'On Status Change', # loc
171 Description => 'Whenever a ticket\'s status changes', # loc
172 ApplicableTransTypes => 'Status',
173 ExecModule => 'AnyTransaction',
178 Name => 'On Priority Change', # loc
179 Description => 'Whenever a ticket\'s priority changes', # loc
180 ApplicableTransTypes => 'Set',
181 ExecModule => 'PriorityChange',
185 Name => 'On Owner Change', # loc
186 Description => 'Whenever a ticket\'s owner changes', # loc
187 ApplicableTransTypes => 'Any',
188 ExecModule => 'OwnerChange',
193 Name => 'On Queue Change', # loc
194 Description => 'Whenever a ticket\'s queue changes', # loc
195 ApplicableTransTypes => 'Set',
196 ExecModule => 'QueueChange',
199 { Name => 'On Resolve', # loc
200 Description => 'Whenever a ticket is resolved', # loc
201 ApplicableTransTypes => 'Status',
202 ExecModule => 'StatusChange',
203 Argument => 'resolved'
207 { Name => 'User Defined', # loc
208 Description => 'Whenever a user-defined condition occurs', # loc
209 ApplicableTransTypes => 'Any',
210 ExecModule => 'UserDefined'
218 Name => 'Blank', # loc
219 Description => 'A blank template', # loc
223 Name => 'Transaction', # loc
224 Description => 'Default transaction template', # loc
225 Content => 'RT-Attach-Message: yes
228 {$Transaction->CreatedAsString}: Request {$Ticket->id} was acted upon.
229 Transaction: {$Transaction->Description}
230 Queue: {$Ticket->QueueObj->Name}
231 Subject: {$Transaction->Subject || $Ticket->Subject || "(No subject given)"}
232 Owner: {$Ticket->OwnerObj->Name}
233 Requestors: {$Ticket->RequestorAddresses}
234 Status: {$Ticket->Status}
235 Ticket <URL: {$RT::WebURL}Ticket/Display.html?id={$Ticket->id} >
238 {$Transaction->Content()}
245 Name => 'Admin Correspondence', # loc
246 Description => 'Default admin correspondence template', # loc
247 Content => 'RT-Attach-Message: yes
250 <URL: {$RT::WebURL}Ticket/Display.html?id={$Ticket->id} >
252 {$Transaction->Content()}
257 Name => 'Correspondence', # loc
258 Description => 'Default correspondence template', # loc
259 Content => 'RT-Attach-Message: yes
261 {$Transaction->Content()}
266 Name => 'Admin Comment', # loc
267 Description => 'Default admin comment template', # loc
269 'Subject: [Comment] {my $s=($Transaction->Subject||$Ticket->Subject); $s =~ s/\\[Comment\\]//g; $comment =~ s/^Re//i; $s;}
272 {$RT::WebURL}Ticket/Display.html?id={$Ticket->id}
273 This is a comment. It is not sent to the Requestor(s):
275 {$Transaction->Content()}
280 Name => 'Status Change', # loc
281 Description => 'Ticket status changed', # loc
282 Content => 'Subject: Status Changed to: {$Transaction->NewValue}
285 {$RT::WebURL}Ticket/Display.html?id={$Ticket->id}
287 {$Transaction->Content()}
294 Name => 'Resolved', # loc
295 Description => 'Ticket Resolved', # loc
296 Content => 'Subject: Resolved: {$Ticket->Subject}
298 According to our records, your request has been resolved. If you have any
299 further questions or concerns, please respond to this message.
302 { Queue => '___Approvals',
303 Name => "New Pending Approval", # loc
305 "Notify Owners and AdminCcs of new items pending their approval", # loc
306 Content => 'Subject: New Pending Approval: {$Ticket->Subject}
310 There is a new item pending your approval: "{$Ticket->Subject()}",
311 a summary of which appears below.
313 Please visit {$RT::WebURL}Approvals/Display.html?id={$Ticket->id}
314 to approve or reject this ticket, or {$RT::WebURL}Approvals/ to
315 batch-process all your pending approvals.
317 -------------------------------------------------------------------------
318 {$Transaction->Content()}
321 { Queue => '___Approvals',
322 Name => "Approval Passed", # loc
324 "Notify Owner of their ticket has been approved by some approver", # loc
325 Content => 'Subject: Ticket Approved: {$Ticket->Subject}
329 Your ticket has been approved by { eval { $Approval->OwnerObj->Name } }.
330 Other approvals may be pending.
333 { Queue => '___Approvals',
334 Name => "All Approvals Passed", # loc
336 "Notify Owner of their ticket has been approved by all approvers", # loc
337 Content => 'Subject: Ticket Approved: {$Ticket->Subject}
341 Your ticket has been approved. Its Owner may now start to act on it.
344 { Queue => '___Approvals',
345 Name => "Approval Rejected", # loc
347 "Notify Owner of their rejected ticket", # loc
348 Content => 'Subject: Ticket Rejected: {$Ticket->Subject}
352 Your ticket has been rejected by { eval { $Approval->OwnerObj->Name } }.
359 { ScripCondition => 'On Correspond',
360 ScripAction => 'Open Tickets',
361 Template => 'Blank' },
362 { ScripCondition => 'On Owner Change',
363 ScripAction => 'Notify Owner',
364 Template => 'Transaction' },
365 { ScripCondition => 'On Correspond',
366 ScripAction => 'Notify Other Recipients',
367 Template => 'Correspondence' },
369 { Description => "When an approval ticket is created, notify the Owner and AdminCc of the item awaiting their approval", # loc
370 Queue => '___Approvals',
371 ScripCondition => 'User Defined',
372 CustomIsApplicableCode => q[
373 $self->TicketObj->Type eq 'approval' and
374 $self->TransactionObj->Field eq 'Status' and
375 $self->TransactionObj->NewValue eq 'open' and
376 eval { $T::Approving = ($self->TicketObj->AllDependedOnBy( Type => 'ticket' ))[0] }
378 ScripAction => 'Notify Owner',
379 Template => 'New Pending Approval' },
380 { Description => "If an approval is rejected, reject the original and delete pending approvals", # loc
381 Queue => '___Approvals',
382 ScripCondition => 'On Status Change',
383 ScripAction => 'User Defined',
384 CustomPrepareCode => q[
385 # ------------------------------------------------------------------- #
386 return(0) unless ( lc($self->TransactionObj->NewValue) eq "rejected" or
387 lc($self->TransactionObj->NewValue) eq "deleted" );
390 my $links = $self->TicketObj->DependedOnBy;
391 foreach my $link (@{ $links->ItemsArrayRef }) {
392 my $obj = $link->BaseObj;
393 if ($obj->QueueObj->IsActiveStatus($obj->Status)) {
394 if ($obj->Type eq 'ticket') {
396 Content => $self->loc("Your request was rejected."),
399 Status => 'rejected',
403 $T::Approval = $self->TicketObj; # so we can access it inside templates
404 $self->{TicketObj} = $obj; # we want the original id in the token line
416 $links = $self->TicketObj->DependsOn;
417 foreach my $link (@{ $links->ItemsArrayRef }) {
418 my $obj = $link->TargetObj;
419 if ($obj->QueueObj->IsActiveStatus($obj->Status)) {
427 # Now magically turn myself into a Requestor Notify object...
428 require RT::Action::Notify; bless($self, 'RT::Action::Notify');
429 $self->{Argument} = 'Requestor'; $self->Prepare;
432 # ------------------------------------------------------------------- #
434 CustomCommitCode => '"never needed"',
435 Template => 'Approval Rejected', },
436 { Description => "When a ticket has been approved by any approver, add correspondence to the original ticket", # loc
437 Queue => '___Approvals',
438 ScripCondition => 'On Resolve',
439 ScripAction => 'User Defined',
440 CustomPrepareCode => q[
441 # ------------------------------------------------------------------- #
442 return(0) unless ($self->TicketObj->Type eq 'approval');
445 my $t = $self->TicketObj->Transactions;
446 while (my $o = $t->Next) {
447 $note .= $o->Content . "\n" if $o->ContentObj
448 and $o->Content !~ /Default Approval/;
451 foreach my $obj ($self->TicketObj->AllDependedOnBy( Type => 'ticket' )) {
453 Content => $self->loc( "Your request has been approved by [_1]. Other approvals may still be pending.", # loc
454 $self->TransactionObj->CreatorObj->Name,
455 ) . "\n" . $self->loc( "Approver's notes: [_1]", # loc
459 $T::Approval = $self->TicketObj; # so we can access it inside templates
460 $self->{TicketObj} = $obj; # we want the original id in the token line
463 # Now magically turn myself into a Requestor Notify object...
464 require RT::Action::Notify; bless($self, 'RT::Action::Notify');
465 $self->{Argument} = 'Requestor'; $self->Prepare;
468 # ------------------------------------------------------------------- #
470 CustomCommitCode => '"never needed"',
471 Template => 'Approval Passed' },
472 { Description => "When a ticket has been approved by all approvers, add correspondence to the original ticket", # loc
473 Queue => '___Approvals',
474 ScripCondition => 'On Resolve',
475 ScripAction => 'User Defined',
476 CustomPrepareCode => q[
477 # ------------------------------------------------------------------- #
478 # Find all the tickets that depend on this (that this is approving)
480 my $Ticket = $self->TicketObj;
481 my @TOP = $Ticket->AllDependedOnBy( Type => 'ticket' );
482 my $links = $Ticket->DependedOnBy;
485 while (my $link = $links->Next) {
486 my $obj = $link->BaseObj;
487 next if ($obj->HasUnresolvedDependencies( Type => 'approval' ));
489 if ($obj->Type eq 'ticket') {
491 Content => $self->loc("Your request has been approved."),
493 $T::Approval = $Ticket; # so we can access it inside templates
494 $self->{TicketObj} = $obj; # we want the original id in the token line
497 elsif ($obj->Type eq 'approval') {
498 $obj->SetStatus( Status => 'open', Force => 1 );
500 elsif ($RT::UseCodeTickets and $obj->Type eq 'code') {
501 my $code = $obj->Transactions->First->Content;
504 foreach my $TOP (@TOP) {
507 $RT::Logger->error("Cannot eval code: $@") if $@;
511 $obj->SetStatus( Status => 'resolved', Force => 1,);
514 $obj->SetStatus( Status => 'rejected', Force => 1,);
519 # Now magically turn myself into a Requestor Notify object...
520 require RT::Action::Notify; bless($self, 'RT::Action::Notify');
521 $self->{Argument} = 'Requestor'; $self->Prepare;
523 return 0; # ignore $passed;
524 # ------------------------------------------------------------------- #
526 CustomCommitCode => '"never needed"',
527 Template => 'All Approvals Passed', },
532 { UserId => 'Nobody', # - principalId
533 Right => 'OwnTicket', },
535 { UserId => 'root', # - principalid
536 Right => 'SuperUser', },
541 # Predefined searches
544 { Name => 'Search - My Tickets',
545 Description => '[_1] highest priority tickets I own', # loc
547 { 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",
548 Query => " Owner = '__CurrentUser__' AND ( Status = 'new' OR Status = 'open')",
549 OrderBy => 'Priority',
552 { Name => 'Search - Unowned Tickets',
553 Description => '[_1] newest unowned tickets', # loc
556 { 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: ' ",
557 Query => " Owner = 'Nobody' AND ( Status = 'new' OR Status = 'open')",
558 OrderBy => 'Created',
561 { Name => 'HomepageSettings',
562 Description => 'HomepageSettings',
565 [ { type => 'system', name => 'My Tickets' },
566 { type => 'system', name => 'Unowned Tickets' },
567 { type => 'component', name => 'QuickCreate'},
571 { type => 'component', name => 'MyReminders' },
572 { type => 'component', name => 'Quicksearch' },
573 { type => 'component', name => 'RefreshHomepage' },