Difference between revisions of "Transaction"

From Request Tracker Wiki
Jump to navigation Jump to search
(One intermediate revision by the same user not shown)
Line 33: Line 33:
*Set (password, queue, date/time, owner)
*Set (password, queue, date/time, owner)
*Set-TimeWorked (till RT 4.2, then deprecated in favor of "Set")

Latest revision as of 10:08, 10 January 2020

A Transaction in RT is anything that happens to a Ticket.

RT logs each transaction in the history of the ticket, and Scrips may also be attached to all or to certain kinds of transactions.

Common transactions are Comments and Correspondence

All types of transaction from lib/RT/Transaction.pm:

  • Create
  • Enabled
  • Disabled
  • Status
  • SystemError
  • AttachmentTruncate
  • AttachmentDrop
  • AttachmentError
  • Forward Transaction
  • Forward Ticket
  • CommentEmailRecord
  • EmailRecord – is set when RT is sending outgoing notification (correspondence, comment). Also if crontool is used.
  • Correspond – is set when some user sends a correspondence
  • Comment – is set when some user sends a comment
  • CustomField
  • Untake
  • Take
  • Force (forced owner change)
  • Steal
  • Give
  • AddWatcher
  • DelWatcher
  • Subject
  • Addlink
  • DeleteLink
  • Told
  • Set (password, queue, date/time, owner)
  • Set-TimeWorked (till RT 4.2, then deprecated in favor of "Set")
  • PurgeTransaction
  • AddReminder
  • OpenReminder
  • ResolveReminder


Use $self->TransactionObj->Field to get the actual value of the specified type. For example:

if ($self->TransactionObj->Type eq "CustomField") {print $self->TransactionObj->Field;}

gives you the ID of currently processed CustomField.

Another example of scrip custom condition:

# On Create or Queue change
return 0 unless (($self->TransactionObj->Type eq "Create") || ($self->TransactionObj->Type eq "Set" && $self->TransactionObj->Field eq "Queue"));