Developer
User Docs ↗

NAME

  RT::Transactions - a collection of RT Transaction objects

SYNOPSIS

  use RT::Transactions;

DESCRIPTION

METHODS

LimitToTicket TICKETID

Find only transactions for the ticket whose id is TICKETID.

This includes tickets merged into TICKETID.

Repeated calls to this method will intelligently limit down to that set of tickets, joined with an OR

SingleTicketSearch [BOOLEAN]

Gets or sets whether the caller limits this search to a single ticket's history. It only applies to MySQL and MariaDB full text indexing, where a Content search normally runs MATCH, which InnoDB evaluates against the whole index. When this is true, the search instead scans the ticket's own indexed content, which is much faster for one ticket. Unlike MATCH, boolean mode operators other than a trailing * match literally, and stopwords and short words are not ignored. On MySQL this requires regexp_time_limit to be 0.

SortFields

Returns the list of fields that lists of transactions can easily be sorted by

SplitFields

Returns the list of fields that are supposed to be split into individual subqueries and then combined later.

If fulltext search is enabled and indexed, it returns Content, otherwise it returns an empty list.

Limit Helper Routines

These routines are the targets of a dispatch table depending on the type of field. They all share the same signature:

  my ($self,$field,$op,$value,@rest) = @_;

The values in @rest should be suitable for passing directly to DBIx::SearchBuilder::Limit.

Essentially they are an expanded/broken out (and much simplified) version of what ProcessRestrictions used to do. They're also much more clearly delineated by the TYPE of field being processed.

_IdLimit

Handle ID field.

_EnumLimit

Handle Fields which are limited to certain values, and potentially need to be looked up from another class.

This subroutine actually handles two different kinds of fields. For some the user is responsible for limiting the values. (i.e. ObjectType).

For others, the value specified by the user will be looked by via specified class.

Meta Data: name of class to lookup in (Optional)

IsHiddenTimeField FIELD

Returns true if FIELD is one of the time columns and the current user may not see it, per "CurrentUserCanSeeTime" in RT::Ticket.

_IntLimit

Handle fields where the values are limited to integers. (id)

Meta Data: None

_DateLimit

Handle date fields. (Created)

Meta Data: 1: type of link. (Probably not necessary.)

_StringLimit

Handle simple fields which are just strings. (Type, Field, OldValue, NewValue, ReferenceType)

Meta Data: None

_ObjectCustomFieldValueLimit

Handle object custom field values. (OldReference, NewReference)

Meta Data: None

_CustomFieldNameLimit

Handle custom field name field. (Field)

Meta Data: None

_CustomFieldDecipher

Try and turn a CF descriptor into (cfid, cfname) object pair.

Takes an optional second parameter of the CF LookupType, defaults to Ticket CFs.

_CustomFieldLimit

Limit based on CustomFields

Meta Data: none

_AttachLimit

Limit based on the ContentType or the Filename of an attachment.

_AttachContentLimit

Limit based on the Content of a transaction.

FromSQL

Convert a RT-SQL string into a set of SearchBuilder restrictions.

Returns (1, 'Status message') on success and (0, 'Error Message') on failure.

Query

Returns the last string passed to "FromSQL".

← Back to index