RT 4.4.1 Documentation

RT::Scrips

NAME

  RT::Scrips - a collection of RT Scrip objects

SYNOPSIS

  use RT::Scrips;

DESCRIPTION

METHODS

LimitToQueue

Takes a queue id (numerical) as its only argument. Makes sure that Scopes it pulls out apply to this queue (or another that you've selected with another call to this method

LimitToGlobal

Makes sure that Scopes it pulls out apply to all queues (or another that you've selected with another call to this method or LimitToQueue

LimitByTemplate

Takes a RT::Template object and limits scrips to those that use the template.

AddRecord

Overrides the collection to ensure that only scrips the user can see are returned.

Apply

Run through the relevant scrips. Scrips will run in order based on description. (Most common use case is to prepend a number to the description, forcing the scrips to run in ascending alphanumerical order.)

Commit

Commit all of this object's prepared scrips

Prepare

Only prepare the scrips, returning an array of the scrips we're interested in in order of preparation, not execution

Prepared

Returns an arrayref of the scrips this object has prepared

_SetupSourceObjects { TicketObj , Ticket, Transaction, TransactionObj }

Setup a ticket and transaction for this Scrip collection to work with as it runs through the relevant scrips. (Also to figure out which scrips apply)

Returns: nothing

_FindScrips

Find only the appropriate scrips for whatever we're doing now. Order them by the SortOrder field from the ObjectScrips table.

← Back to index