RT 3.8.17 Documentation
RT::Transaction Overlay
- NAME
- SYNOPSIS
- DESCRIPTION
- METHODS
- Create
- Scrips
- Rules
- Delete
- Message
- Content PARAMHASH
- Addresses
- ContentObj
- Subject
- Attachments
- _Attach
- Description
- BriefDescription
- IsInbound
- _Value
- CurrentUserHasRight RIGHT
- CurrentUserCanSee
- UpdateCustomFields
- CustomFieldValues
- CustomFieldLookupType
- DeferredRecipients($freq, $include_sent )
- ACLEquivalenceObjects
NAME
RT::Transaction - RT\'s transaction object
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 by 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
Scrips
Returns the Scrips object for this transaction. This routine is only useful on a freshly created transaction object. Scrips do not get persisted to the database with transactions.
Rules
Returns the array of Rule objects for this transaction. This routine is only useful on a freshly created transaction object. Rules do not get persisted to the database with transactions.
Delete
Delete this transaction. Currently DOES NOT CHECK ACLS
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 body of the first textual part (as defined in RT::I18N::IsTextualContentType). Otherwise, returns undef.
Takes a paramhash. If the $args{'Quote'} parameter is set, wraps this message at $args{'Wrap'}. $args{'Wrap'} defaults to 70.
If $args{'Type'} is set to text/html
, this will return an HTML part of the message, if available. Otherwise it looks for a text/plain part. If $args{'Type'} is missing, it defaults to the value of $RT::Transaction::PreferredContentType
, if that's missing too, defaults to textual.
Addresses
Returns a hashref of addresses related to this transaction. See "Addresses" in RT::Attachment for details.
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
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.
CurrentUserCanSee
Returns true if current user has rights to see this particular transaction.
This fact depends on type of the transaction, type of an object the transaction is attached to and may be other conditions, so this method is prefered over custom implementations.
UpdateCustomFields
Takes a hash of
CustomField-<<Id>> => Value
or
Object-RT::Transaction-CustomField-<<Id>> => Value parameters to update
this transaction's custom fields
CustomFieldValues
Do name => id mapping (if needed) before falling back to RT::Record's CustomFieldValues
See L<RT::Record>
CustomFieldLookupType
Returns the RT::Transaction lookup type, which can be passed to RT::CustomField->Create() via the 'LookupType' hash key.
DeferredRecipients($freq, $include_sent )
Takes the following arguments:
a string to indicate the frequency of digest delivery. Valid values are "daily", "weekly", or "susp".
an optional argument which, if true, will return addresses even if this notification has been marked as 'sent' for this transaction.
Returns an array of users who should now receive the notification that was recorded in this transaction. Returns an empty array if there were no deferred users, or if $include_sent was not specified and the deferred notifications have been sent.
ACLEquivalenceObjects
This method returns a list of objects for which a user's rights also apply to this Transaction.
This currently only applies to Transaction Custom Fields on Tickets, so we return the Ticket's Queue and the Ticket.
This method is called from "HasRight" in RT::Principal.
← Back to index