]> git.uio.no Git - usit-rt.git/blobdiff - docs/initialdata.pod
Putting 4.2.0 on top of 4.0.17
[usit-rt.git] / docs / initialdata.pod
index c649b622157a147cbdc3e408f4be4a24e8fa1509..0ed73f477184937d6a26d2d1ec5b6be3849e3be7 100644 (file)
@@ -78,14 +78,13 @@ For a full list of fields, read the documentation for L<RT::User/Create>.
 =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
@@ -145,7 +144,6 @@ L<RT::Queue/Create> for the fields you can use.
 =head2 C<@CustomFields>
 
     push @CustomFields, {
-        Queue       => 0,
         Name        => 'Favorite color',
         Type        => 'FreeformSingle',
         LookupType  => 'RT::Queue-RT::Ticket',
@@ -164,10 +162,15 @@ The name of this CF as displayed in RT.
 
 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>
 
@@ -215,6 +218,7 @@ is for Tickets, Transactions, Users, Groups, or Queues.  Possible values:
     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>.
@@ -247,7 +251,6 @@ field.  This only makes sense for "Select" CFs.  An example:
 
     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
@@ -301,6 +304,7 @@ granted.  This is B<different> than the user/group/role receiving the right.
 =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
 
@@ -311,6 +315,11 @@ granted.  This is B<different> than the user/group/role receiving the right.
     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.