Update exiting RT2 Ticket
Today I spent some time trying to update a property of exiting Rt2 Ticket. I made a search in the class Ticket and didn’t find anything similar Update of Save. It turned out, that RT doesn’t use a specific method to store all modified object properties. To set a new value to objetc property it constructs the setter:
Set<propertyname>
Moreover, RT save the new value in the database immediately after calling the setter.
Here is a simple example how to set a new FinalPriority to the Ticket:
my $ticket = new RT::Ticket($curr_user);
$ticket->Load($ticket_id);
print "Priotiry befora update is " . $ticket->FinalPriority . "\n";
$ticket->SetFinalPriority(50);
print "Priotiry after update is " . $ticket->FinalPriority . "\n";