[rt-users] Adding custom field values from Perl script.

Jacob Helwig Jacob at buschs.com
Mon Dec 11 10:17:17 EST 2006


That $dbh is for a separate database for storing feedback "forms" sent
out to people that have used our help desk.  Any changes to the RT
database, I am doing through the RT interface.  my $sth =
$dbh->prepare("SELECT * FROM new_survey(?,?,?)"); actually inserts into
the feedback database, and returns the id of the inserted row, updating
a few other tables in that database, as necessary.

I will take a closer look at AddCustomFieldValue, though.

> -----Original Message-----
> From: Stephen Turner [mailto:sturner at MIT.EDU]
> Sent: Monday, December 11, 2006 10:04
> To: Jacob Helwig; rt-users at lists.bestpractical.com
> Subject: RE: [rt-users] Adding custom field values from Perl script.
>  
> 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
> 




More information about the rt-users mailing list