=head2 C<@Groups>
push @Groups, {
- Domain => 'UserDefined',
Name => 'Example Employees',
Description => 'All of the employees of my company',
};
Creates a new L<RT::Group> for each hashref. In almost all cases you'll want
to follow the example above to create a group just as if you had done it from
-the admin interface. B<Do not> omit the C<< Domain => 'UserDefined' >> line.
+the admin interface.
Additionally, the C<MemberOf> field is specially handled to make it easier to
add the new group to other groups. C<MemberOf> may be a single value or an
=head2 C<@CustomFields>
push @CustomFields, {
- Queue => 0,
Name => 'Favorite color',
Type => 'FreeformSingle',
LookupType => 'RT::Queue-RT::Ticket',
A short summary of what this CF is for.
-=item C<Queue>
+=item C<ApplyTo>
-May be a Name or ID. The single queue or array ref of queues to apply this CF
-to. This does not apply when C<LookupType> does not start with C<RT::Queue>.
+May be a single value, or an array reference of such; each should be
+either an ID or Name. If omitted, the CF is applied globally. This
+should not be used for User or Group custom fields.
+
+This argument may also be passed via C<Queue>, for backwards
+compatibility, which also defaults the C<LookupType> to
+C<RT::Queue-RT::Ticket>.
=item C<Type>
RT::User # Users
RT::Group # Groups
RT::Queue # Queues
+ RT::Class-RT::Article # Articles
Ticket CFs are the most common, meaning C<RT::Queue-RT::Ticket> is the most
common C<LookupType>.
my $i = 1;
push @CustomFields, {
- Queue => 0, # Globally applied
LookupType => 'RT::Queue-RT::Ticket', # for Tickets
Name => 'Type of food',
Type => 'SelectSingle', # SelectSingle is the same as: Type => 'Select', MaxValues => 1
=item Granted on a custom field by name (or ID), potentially a global or queue
CF => 'Name',
+ LookupType => 'RT::User', # optional, in case you need to disambiguate
=item Granted on a queue
CF => 'Name',
Queue => 'Name',
+=item Granted on some other object (article Classes, etc)
+
+ ObjectType => 'RT::Class',
+ ObjectId => 'Name',
+
=item Granted globally
Specifying none of the above will get you a global right.