RT::Scrip(3)

NAME
  RT::Scrip - an RT Scrip object

SYNOPSIS
  use RT::Scrip;

DESCRIPTION

METHODS

  Create
Creates a new entry in the Scrips table. Takes a paramhash with the attributes:

    Queue           A queue id or 0 for a global scrip
    Template        A template ID or name.
                    Behavior is undefined if you have multiple items with
                    the same name
    ScripAction     A ScripAction id or name
                    Behavior is undefined if you have multiple items with
                    the same name
    ScripCondition  A ScripCondition id or name
                    Behavior is undefined if you have multiple items with
                    the same name

Returns (retval, msg); retval is 0 for failure or scrip id. msg is a textual description of what happened.

  Delete
Delete this object

  QueueObj
Retuns an RT::Queue object with this Scrip\'s queue

  ActionObj
Retuns an RT::Action object with this Scrip\'s Action

  TemplateObj
Retuns an RT::Template object with this Scrip\'s Template

  Prepare
Calls the action object's prepare method

  Commit
Calls the action object's commit method

  ConditionObj
Retuns an RT::ScripCondition object with this Scrip's IsApplicable

  IsApplicable
Calls the Condition object\'s IsApplicable method

  CurrentUserHasRight
Helper menthod for HasRight. Presets Principal to CurrentUser then calls HasRight.

  HasRight
Takes a param-hash consisting of "Right" and "Principal" Principal is an RT::User object or an RT::CurrentUser object. "Right" is a textual Right string that applies to Scrips.