RT 4.2.11, ticket#13852
[freeside.git] / rt / t / data / initialdata / initialdata
1 # Samples of all things we support in initialdata
2
3 @Queues = (
4     {
5         Name                => 'Test Queue',
6         CorrespondAddress   => 'help@example.com',
7         CommentAddress      => 'help-comment@example.com',
8     }
9 );
10
11 @Scrips = (
12     {
13         Description    => 'Test Without Stage',
14         ScripCondition => 'On Resolve',
15         ScripAction    => 'Notify Requestors',
16         Template       => 'Correspondence in HTML',
17     },
18     {
19         Queue          => 'General',
20         Description    => 'Test Without Stage and One Queue',
21         ScripCondition => 'On Resolve',
22         ScripAction    => 'Notify Requestors',
23         Template       => 'Correspondence in HTML',
24     },
25     {
26         Queue          => ['General', 'Test Queue'],
27         Description    => 'Test Without Stage and Two Queues',
28         ScripCondition => 'On Resolve',
29         ScripAction    => 'Notify Requestors',
30         Template       => 'Correspondence in HTML',
31     },
32     {
33         Description    => 'Test TransactionCreate',
34         ScripCondition => 'On Resolve',
35         ScripAction    => 'Notify Requestors',
36         Template       => 'Correspondence in HTML',
37         Stage          => 'TransactionCreate',
38     },
39     {
40         Description    => 'Test TransactionBatch',
41         ScripCondition => 'On Resolve',
42         ScripAction    => 'Notify Requestors',
43         Template       => 'Correspondence in HTML',
44         Stage          => 'TransactionBatch',
45     },
46 );
47
48 @CustomFields = (
49     {
50         Name        => 'Favorite color',
51         Type        => 'FreeformSingle',
52         LookupType  => 'RT::Queue-RT::Ticket',
53         Queue       => 'Test Queue',
54     },
55 );
56
57 @Groups = (
58     {
59         Name        => 'Test Employees',
60         Description => 'All of the employees of my company',
61         Attributes  => [
62             {
63                 Name        => 'SavedSearch',
64                 Description => 'Stalled Tickets in Test Queue',
65                 Content     => {
66                     Query   => "Status = 'stalled' AND Queue = 'Test Queue'",
67                     OrderBy => 'id',
68                     Order   => 'DESC'
69                 },
70             },
71         ],
72     }
73 );
74
75 @ACL = (
76     { GroupId       => 'Test Employees',
77       GroupDomain   => 'UserDefined',
78       CF            => 'Favorite Color',
79       Queue         => 'Test Queue',
80       Right         => ['SeeCustomField', 'ModifyCustomField'],
81     },
82 );
83
84 @Attributes = ({
85     Name        => 'SavedSearch',
86     Description => 'New Tickets in Test Queue',
87     Object      => sub {
88         my $GroupName = 'Test Employees';
89         my $group     = RT::Group->new( RT->SystemUser );
90
91         my( $ret, $msg ) = $group->LoadUserDefinedGroup( $GroupName );
92         die $msg unless $ret;
93
94         return $group;
95     },
96     Content     => {
97         Query   => "Status = 'new' AND Queue = 'Test Queue'",
98         OrderBy => 'id',
99         Order   => 'DESC'
100     },
101 });