Accessing fields not in basic RT database schema from scrips

I am a beginner user of RT 2. We have a setup where a web form collects
request info and creates a ticket in the RT database. The ticket display
shows a field History that contains several lines of the form:

field_name=value

harvested from the web form. For example:

FirstName=foo
LastName=bar
Organization=foobar

I would like to be able to read and parse the contents of this History text
in an Action scrip that’s called after ticket creation (i.e., the web form
creates the ticket, the new ticket creation in RT triggers the Action scrip
using an OnCreate condition, which Action scrip then parses the info
harvested from the web form and inserted into the ticket in the database).

Has anyone some idea of how I should go about this? I can’t figure out how
to get the handle to this History field. It doesn’t appear in the fields
documented in fsck.com/rtfm.

Thank you very much,
GB

MSN 8 helps eliminate e-mail viruses. Get 2 months FREE*.
http://join.msn.com/?page=features/virus

Gabriel Bereny wrote:

I would like to be able to read and parse the contents of this History text
in an Action scrip that’s called after ticket creation (i.e., the web form
creates the ticket, the new ticket creation in RT triggers the Action scrip
using an OnCreate condition, which Action scrip then parses the info
harvested from the web form and inserted into the ticket in the database).

Has anyone some idea of how I should go about this? I can’t figure out how
to get the handle to this History field. It doesn’t appear in the fields
documented in fsck.com/rtfm.

$self->TransactionObj will return an RT::Transaction object
whose content you can parse using the Content() method.

Or, if you’re only ever wanting to parse the first transaction,
using $self->TicketObj->Transactions->First instead will allow
you to use the ScripAction in other than an OnCreate condition.
�|� Request Tracker... So much more than a help desk — Best Practical Solutions – Trouble Ticketing. Free.