SYNOPSIS

  use RT::Queue;

DESCRIPTION

METHODS

AvailableRights

Returns a hash of available rights for this object. The keys are the right names and the values are a description of what the rights do

ActiveStatusArray

Returns an array of all ActiveStatuses for this queue

InactiveStatusArray

Returns an array of all InactiveStatuses for this queue

StatusArray

Returns an array of all statuses for this queue

IsValidStatus VALUE

Returns true if VALUE is a valid status. Otherwise, returns 0

IsActiveStatus VALUE

Returns true if VALUE is a Active status. Otherwise, returns 0

IsInactiveStatus VALUE

Returns true if VALUE is a Inactive status. Otherwise, returns 0

Create

Create takes the name of the new queue If you pass the ACL check, it creates the queue and returns its queue id.

SetDisabled

Takes a boolean. 1 will cause this queue to no longer be avaialble for tickets. 0 will re-enable this queue

Load

Takes either a numerical id or a textual Name and loads the specified queue.

ValidateName NAME

Takes a queue name. Returns true if it's an ok name for a new queue. Returns undef if there's already a queue by that name.

Templates

Returns an RT::Templates object of all of this queue's templates.

CustomField NAME

Load the queue-specific custom field named NAME

CustomFields

Returns an RT::CustomFields object containing all global custom fields, as well as those tied to this queue

_CreateQueueGroups

Create the ticket groups and relationships for this ticket. This routine expects to be called from Ticket->Create _inside of a transaction_

It will create four groups for this ticket: Requestor, Cc, AdminCc and Owner.

It will return true on success and undef on failure.

AddWatcher

AddWatcher takes a parameter hash. The keys are as follows:

Type One of Requestor, Cc, AdminCc

PrinicpalId The RT::Principal id of the user or group that's being added as a watcher Email The email address of the new watcher. If a user with this email address can't be found, a new nonprivileged user will be created.

If the watcher you\'re trying to set has an RT account, set the Owner paremeter to their User Id. Otherwise, set the Email parameter to their Email address.

DeleteWatcher { Type => TYPE, PrincipalId => PRINCIPAL_ID, Email => EMAIL_ADDRESS }

Deletes a queue watcher. Takes two arguments:

Type (one of Requestor,Cc,AdminCc)

and one of

PrincipalId (an RT::Principal Id of the watcher you want to remove) OR Email (the email address of an existing wathcer)

AdminCcAddresses

returns String: All queue AdminCc email addresses as a string

CcAddresses

returns String: All queue Ccs as a string of email addresses

Cc

Takes nothing. Returns an RT::Group object which contains this Queue's Ccs. If the user doesn't have "ShowQueue" permission, returns an empty group

AdminCc

Takes nothing. Returns an RT::Group object which contains this Queue's AdminCcs. If the user doesn't have "ShowQueue" permission, returns an empty group

IsWatcher { Type => TYPE, PrincipalId => PRINCIPAL_ID }

Takes a param hash with the attributes Type and PrincipalId

Type is one of Requestor, Cc, AdminCc and Owner

PrincipalId is an RT::Principal id

Returns true if that principal is a member of the group Type for this queue

IsCc PRINCIPAL_ID

  Takes an RT::Principal id.
  Returns true if the principal is a requestor of the current queue.

IsAdminCc PRINCIPAL_ID

  Takes an RT::Principal id.
  Returns true if the principal is a requestor of the current queue.

CurrentUserHasRight

Takes one argument. A textual string with the name of the right we want to check. Returns true if the current user has that right for this queue. Returns undef otherwise.

HasRight

Takes a param hash with the fields 'Right' and 'Principal'. Principal defaults to the current user. Returns true if the principal has that right for this queue. Returns undef otherwise.