> -----Original Message----- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] On Behalf > Of Jacob Helwig > Sent: Saturday, December 09, 2006 9:38 AM > To: [email protected] > Subject: RE: [rt-users] Adding custom field values from Perl script. > > Certainly: > > if ($ticket->AddCustomFieldValue({ Field => 7, Value => >"" . $surveyid[0] . "" })) { > print "\tOK!\n"; > } else { > print "\tFAILED!\n"; > $dbh->pg_rollback_to("requestor_entry"); > } >
Jacob, I can't see anything obviously wrong with the AddCustomFieldValue statement - I'd recommend using the Perl debugger to step into the AddCustomFieldValue method (in Record.pm) and see what it does. I'm wondering about the use of the transaction control on the $dbh handle though. The only database updates in the script are done through the RT API using a separate database handle ($RT::Handle) - so the rollbacks, commits, etc that you do on $dbh have no effect on these updates. The RT API has methods to control transactions, so it might be better to use those. Steve _______________________________________________ http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users Community help: http://wiki.bestpractical.com Commercial support: [EMAIL PROTECTED] Discover RT's hidden secrets with RT Essentials from O'Reilly Media. Buy a copy at http://rtbook.bestpractical.com
