RTIR 4.0.2 Documentation

RT::IR

Go to latest version →

FUNCTIONS

IsStaff

Is the user id passed in a member of one of the DutyTeam groups

Useful for differentiating between actions by a user of the system vs actions by someone flagged to work on RTIR.

OurQueue

Takes queue name or RT::Queue object and returns its type (see "TicketType"). Returns undef if argument is not valid. Returns empty string if queue is not one of RTIR's.

OurLifecycle LIFECYCLE

Takes a scalar lifecycle name or a lifecycle object. Returns true if this lifecycle is an RTIR lifecycle. Returns undef otherwise

Types

Returns a list of valid TicketTypes

Queues

Returns a list of the core RTIR Queue names

Lifecycles

Return a list of the core RTIR lifecycle names

FriendlyLifecycle

XXX TODO

TicketType

Returns type of a ticket. Takes Ticket, Lifecycle or Queue as an argument. Both arguments could be objects or IDs, however, name of a queue works too for Queue argument. If the queue argument is defined then the ticket is ignored even if it's defined too.

Statuses

Return sorted list of unique statuses for one, many or all RTIR queues.

Takes arguments 'Lifecycle', 'Active' and 'Inactive'. By default returns initial and active statuses. Lifecycle can be an array reference to list several lifecycles.

Examples:

    RT::IR->Statuses()
    RT::IR->Statuses( Lifecycle => 'countermeasures' );
    RT::IR->Statuses( Lifecycle => [ 'countermeasures', 'incident_reports' ] );
    RT::IR->Statuses( Active => 0, Inactive => 1 );

ActiveQuery ARGS

ActiveQuery is a wrapper around Query which automatically limits results to tickets in active or initial states.

Incidents

Takes a ticket and returns collection of all incidents this ticket is member of.

RelevantIncidents

Takes a ticket and returns collection of incidents this ticket is member of excluding abandoned incidents.

IncidentHasActiveChildren

IsLinkedToActiveIncidents $ChildObj [$IncidentObj]

Returns number of active incidents linked to child ticket (IR, Investigation, Countermeasure or other). If second argument provided then it's excluded from count.

When function return zero that means that object has no active parent incidents.

HREFTo

XXX TODO this wants a better name.

URL

XXX TODO

ConstituencyFor $Ticket|$Queue

Returns the textual constituency name for any RTIR ticket or queue Returns undef for non-RTIR tickets and queues.

Dies if handed something that's not a ticket or queue

← Back to index