RT::Tickets - A collection of Ticket objects
use RT::Tickets; my $tickets = new RT::Tickets($CurrentUser);
A collection of RT::Tickets.
Returns the list of fields that lists of tickets can easily be sorted by
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.
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. Status, Type).
For others, the value specified by the user will be looked by via specified class.
Meta Data: name of class to lookup in (Optional)
Handle fields where the values are limited to integers. (For example, Priority, TimeWorked.)
Meta Data: None
Handle fields which deal with links between tickets. (MemberOf, DependsOn)
Meta Data: 1: Direction (From,To) 2: Relationship Type (MemberOf, DependsOn,RefersTo)
Handle date fields. (Created, LastTold..)
Meta Data: 1: type of relationship. (Probably not necessary.)
Handle simple fields which are just strings. (Subject,Type)
Meta Data: None
Handle fields limiting based on Transaction Date.
The inpupt value must be in a format parseable by Time::ParseDate
Meta Data: None
Limit based on the Content of a transaction or the ContentType.
Meta Data: none
Handle watcher limits. (Requestor, CC, etc..)
Meta Data: 1: Field to query on
Limit based on Keywords
Meta Data: none
Takes a paramhash with the fields FIELD, OPERATOR, VALUE and DESCRIPTION Generally best called from LimitFoo methods
Returns a frozen string suitable for handing back to ThawLimits.
Take a frozen Limits string generated by FreezeLimits and make this tickets object have that set of limits.
LimitQueue takes a paramhash with the fields OPERATOR and VALUE. OPERATOR is one of = or !=. (It defaults to =). VALUE is a queue id or Name.
Takes a paramhash with the fields OPERATOR and VALUE. OPERATOR is one of = or !=. VALUE is a status.
If called, this search will not automatically limit the set of results found to tickets of type "Ticket". Tickets of other types, such as "project" and "approval" will be found.
Takes a paramhash with the fields OPERATOR and VALUE. OPERATOR is one of = or !=, it defaults to "=". VALUE is a string to search for in the type of the ticket.
Takes a paramhash with the fields OPERATOR and VALUE. OPERATOR is one of = or !=. VALUE is a string to search for in the subject of the ticket.
Takes a paramhash with the fields OPERATOR and VALUE. OPERATOR is one of =, >, < or !=. VALUE is a ticket Id to search for
Takes a paramhash with the fields OPERATOR and VALUE. OPERATOR is one of =, >, < or !=. VALUE is a value to match the ticket\'s priority against
Takes a paramhash with the fields OPERATOR and VALUE. OPERATOR is one of =, >, < or !=. VALUE is a value to match the ticket\'s initial priority against
Takes a paramhash with the fields OPERATOR and VALUE. OPERATOR is one of =, >, < or !=. VALUE is a value to match the ticket\'s final priority against
Takes a paramhash with the fields OPERATOR and VALUE. OPERATOR is one of =, >, < or !=. VALUE is a value to match the ticket's TimeWorked attribute
Takes a paramhash with the fields OPERATOR and VALUE. OPERATOR is one of =, >, < or !=. VALUE is a value to match the ticket's TimeLeft attribute
Takes a paramhash with the fields OPERATOR and VALUE. OPERATOR is one of =, LIKE, NOT LIKE or !=. VALUE is a string to search for in the body of the ticket
Takes a paramhash with the fields OPERATOR and VALUE. OPERATOR is one of =, LIKE, NOT LIKE or !=. VALUE is a string to search for in the body of the ticket
Takes a paramhash with the fields OPERATOR and VALUE. OPERATOR is one of =, LIKE, NOT LIKE or !=. VALUE is a content type to search ticket attachments for
Takes a paramhash with the fields OPERATOR and VALUE. OPERATOR is one of = or !=. VALUE is a user id.
Takes a paramhash with the fields OPERATOR, TYPE and VALUE. OPERATOR is one of =, LIKE, NOT LIKE or !=. VALUE is a value to match the ticket\'s watcher email addresses against TYPE is the sort of watchers you want to match against. Leave it undef if you want to search all of them
LimitLinkedTo takes a paramhash with two fields: TYPE and TARGET TYPE limits the sort of relationship we want to search on
TYPE = { RefersTo, MemberOf, DependsOn }
TARGET is the id or URI of the TARGET of the link (TARGET used to be 'TICKET'. 'TICKET' is deprecated, but will be treated as TARGET
LimitLinkedFrom takes a paramhash with two fields: TYPE and BASE TYPE limits the sort of relationship we want to search on
BASE is the id or URI of the BASE of the link (BASE used to be 'TICKET'. 'TICKET' is deprecated, but will be treated as BASE
Takes a paramhash with the fields FIELD OPERATOR and VALUE.
OPERATOR is one of > or < VALUE is a date and time in ISO format in GMT FIELD is one of Starts, Started, Told, Created, Resolved, LastUpdated
There are also helper functions of the form LimitFIELD that eliminate the need to pass in a FIELD argument.
Takes a paramhash with the fields FIELD OPERATOR and VALUE.
OPERATOR is one of > or < VALUE is a date and time in ISO format in GMT
Takes a paramhash of key/value pairs with the following keys:
Keep track of the counter for the array of restrictions
Returns a reference to the set of all items found in this search
LoadRestrictions takes a string which can fully populate the TicketRestrictons hash. TODO It is not yet implemented
takes nothing. Returns a hash keyed by restriction id. Each element of the hash is currently a one element hash that contains DESCRIPTION which is a description of the purpose of that TicketRestriction
Takes a restriction field and returns a list of values this field is restricted to.
Removes all restrictions irretrievably
Takes the row Id of a restriction (From DescribeRestrictions' output, for example. Removes that restriction from the session's limits.
# The new _ProcessRestrictions is somewhat dependent on the SQL stuff, # but isn't quite generic enough to move into Tickets_Overlay_SQL.
# Build up a map of first/last/next/prev items, so that we can display search nav quickly
Returns an a map of all items found by this search. The map is of the form
$ItemMap->{'first'} = first ticketid found $ItemMap->{'last'} = last ticketid found $ItemMap->{$id}->{prev} = the tikcet id found before $id $ItemMap->{$id}->{next} = the tikcet id found after $id
You don't want to serialize a big tickets object, as the {items} hash will be instantly invalid _and_ eat lots of space