SYNOPSIS

  use RT::Transaction;

DESCRIPTION

Each RT::Transaction describes an atomic change to a ticket object or an update to an RT::Ticket object. It can have arbitrary MIME attachments.

METHODS

Create

Create a new transaction.

This routine should _never_ be called anything other Than RT::Ticket. It should not be called from client code. Ever. Not ever. If you do this, we will hunt you down. and break your kneecaps. Then the unpleasant stuff will start.

TODO: Document what gets passed to this

Message

  Returns the RT::Attachments Object which contains the "top-level"object
  attachment for this transaction

Content PARAMHASH

If this transaction has attached mime objects, returns the first text/plain part. Otherwise, returns undef.

Takes a paramhash. If the $args{'Quote'} parameter is set, wraps this message at $args{'Wrap'}. $args{'Wrap'} defaults to 70.

ContentObj

Returns the RT::Attachment object which contains the content for this Transaction

Subject

If this transaction has attached mime objects, returns the first one's subject Otherwise, returns null =cut

sub Subject { my $self = shift; if ( $self->Attachments->First ) { return ( $self->Attachments->First->Subject ); } else { return (undef); } }

# }}}

# {{{ sub Attachments

Attachments

  Returns all the RT::Attachment objects which are attached
to this transaction. Takes an optional parameter, which is
a ContentType that Attachments should be restricted to.

_Attach

A private method used to attach a mime object to this transaction.

Description

Returns a text string which describes this transaction

BriefDescription

Returns a text string which briefly describes this transaction

IsInbound

Returns true if the creator of the transaction is a requestor of the ticket. Returns false otherwise

_Value

Takes the name of a table column. Returns its value as a string, if the user passes an ACL check

CurrentUserHasRight RIGHT

Calls $self->CurrentUser->HasQueueRight for the right passed in here. passed in here.