"Fossies" - the Fresh Open Source Software Archive 
Member "RT-Extension-Assets-1.05/etc/Assets_Config.pm" (17 Mar 2015, 5755 Bytes) of package /linux/misc/RT-Extension-Assets-1.05.tar.gz:
As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) Perl source code syntax highlighting (style:
standard) with prefixed line numbers and
code folding option.
Alternatively you can here
view or
download the uninterpreted source code file.
For more information about "Assets_Config.pm" see the
Fossies "Dox" file reference documentation and the last
Fossies "Diffs" side-by-side code changes report:
1.01_vs_1.02.
1 =head1 NAME
2
3 Assets configuration
4
5 =head1 Base configuration
6
7 =over 4
8
9 =item C<Lifecycles>
10
11 Each asset catalog uses a lifecycle, exactly as queues for tickets do --
12 and the configuration is the same. See L<RT_Config/Lifecycles> for
13 documentation on them. Asset lifecycles are differentiated from dicket
14 lifecycles by their type:
15
16 assets => {
17 type => "asset", # Note the type, here
18 initial => [ 'new' ],
19 active => [ 'allocated', 'in-use' ],
20 inactive => [ 'recycled', 'stolen', 'deleted' ],
21 # ...
22 }
23
24 =cut
25
26 Set(%Lifecycles,
27 assets => {
28 type => "asset",
29 initial => [
30 'new' # loc
31 ],
32 active => [
33 'allocated', # loc
34 'in-use' # loc
35 ],
36 inactive => [
37 'recycled', # loc
38 'stolen', # loc
39 'deleted' # loc
40 ],
41
42 defaults => {
43 on_create => 'new',
44 },
45
46 transitions => {
47 '' => [qw(new allocated in-use)],
48 new => [qw(allocated in-use stolen deleted)],
49 allocated => [qw(in-use recycled stolen deleted)],
50 "in-use" => [qw(allocated recycled stolen deleted)],
51 recycled => [qw(allocated)],
52 stolen => [qw(allocated)],
53 deleted => [qw(allocated)],
54 },
55 rights => {
56 '* -> *' => 'ModifyAsset',
57 },
58 actions => {
59 '* -> allocated' => {
60 label => "Allocate" # loc
61 },
62 '* -> in-use' => {
63 label => "Now in-use" # loc
64 },
65 '* -> recycled' => {
66 label => "Recycle" # loc
67 },
68 '* -> stolen' => {
69 label => "Report stolen" # loc
70 },
71 },
72 },
73 ) unless $Lifecycles{assets};
74
75 =item C<@AssetQueues>
76
77 This should be a list of names of queues whose tickets should always
78 display the "Assets" box. This is useful for queues which deal
79 primarily with assets, as it provides a ready box to link an asset to
80 the ticket, even when the ticket has no related assets yet.
81
82 =cut
83
84 # Set(@AssetQueues, ());
85
86 =item C<$DefaultCatalog>
87
88 This provides the default catalog after a user initially logs in.
89 However, the default catalog is "sticky," and so will remember the
90 last-selected catalog thereafter.
91
92 =cut
93
94 # Set($DefaultCatalog, 'General assets');
95
96 =item C<$AssetSearchFields>
97
98 Specifies which fields of L<RT::Asset> to match against and how to match
99 each field when performing a quick search on assets. Valid match
100 methods are LIKE, STARTSWITH, ENDSWITH, =, and !=. Valid search fields
101 are id, Name, Description, or custom fields, which are specified as
102 "CF.1234" or "CF.Name"
103
104 =cut
105
106 Set($AssetSearchFields, {
107 id => '=',
108 Name => 'LIKE',
109 Description => 'LIKE',
110 }) unless $AssetSearchFields;
111
112 =item C<$AssetSearchFormat>
113
114 The format that results of the asset search are displayed with. This is
115 either a string, which will be used for all catalogs, or a hash
116 reference, keyed by catalog's name/id. If a hashref and neither name or
117 id is found therein, falls back to the key ''.
118
119 If you wish to use the multiple catalog format, your configuration would look
120 something like:
121
122 Set($AssetSearchFormat, {
123 'General assets' => q[Format String for the General Assets Catalog],
124 8 => q[Format String for Catalog 8],
125 '' => q[Format String for any catalogs not listed explicitly],
126 });
127
128 =cut
129
130 # loc('Related tickets')
131 Set($AssetSearchFormat, q[
132 '<a href="__WebHomePath__/Asset/Display.html?id=__id__">__Name__</a>/TITLE:Name',
133 Description,
134 '__Status__ (__Catalog__)/TITLE:Status',
135 Owner,
136 HeldBy,
137 Contacts,
138 '__ActiveTickets__ __InactiveTickets__/TITLE:Related tickets',
139 ]) unless $AssetSearchFormat;
140
141 =item C<$AssetSummaryFormat>
142
143 The information that is displayed on ticket display pages about assets
144 related to the ticket. This is displayed in a table beneath the asset
145 name.
146
147 =cut
148
149 Set($AssetSummaryFormat, q[
150 '<a href="__WebHomePath__/Asset/Display.html?id=__id__">__Name__</a>/TITLE:Name',
151 Description,
152 '__Status__ (__Catalog__)/TITLE:Status',
153 Owner,
154 HeldBy,
155 Contacts,
156 '__ActiveTickets__ __InactiveTickets__/TITLE:Related tickets',
157 ]) unless $AssetSummaryFormat;
158
159 =item C<$AssetSummaryRelatedTicketsFormat>
160
161 The information that is displayed on ticket display pages about tickets
162 related to assets related to the ticket. This is displayed as a list of
163 tickets underneath the asset properties.
164
165 =cut
166
167 Set($AssetSummaryRelatedTicketsFormat, q[
168 '<a href="__WebPath__/Ticket/Display.html?id=__id__">__id__</a>',
169 '(__OwnerName__)',
170 '<a href="__WebPath__/Ticket/Display.html?id=__id__">__Subject__</a>',
171 QueueName,
172 Status,
173 ]) unless $AssetSummaryRelatedTicketsFormat;
174
175 =item C<%AdminSearchResultFormat>
176
177 The C<Catalogs> key of this standard RT configuration option (see
178 L<RT_Config/%AdminSearchResultFormat>) controls how catalogs are
179 displayed in their list in the admin pages.
180
181 =cut
182
183 Set(%AdminSearchResultFormat,
184 Catalogs =>
185 q{'<a href="__WebPath__/Admin/Assets/Catalogs/Modify.html?id=__id__">__id__</a>/TITLE:#'}
186 .q{,'<a href="__WebPath__/Admin/Assets/Catalogs/Modify.html?id=__id__">__Name__</a>/TITLE:Name'}
187 .q{,__Description__,__Lifecycle__,__Disabled__},
188 ) unless $AdminSearchResultFormat{Catalogs};
189
190 =item C<$AssetBasicCustomFieldsOnCreate>
191
192 Specify a list of Asset custom fields to show in "Basics" widget on create.
193
194 e.g.
195
196 Set( $AssetBasicCustomFieldsOnCreate, [ 'foo', 'bar' ] );
197
198 =cut
199
200 # Set($AssetBasicCustomFieldsOnCreate, undef );
201
202
203
204 =back
205
206 =cut
207
208 1;