[rt-users] Custom scrip: Ticket created, but commit fails.

Kevin Falcone falcone at bestpractical.com
Thu Jun 24 15:38:22 EDT 2010


On Thu, Jun 24, 2010 at 11:19:00AM -0500, Charles Johnson wrote:
> Badly needing help. This is a script to call a binary that sends
> data to a webservice. The binary simply accepts the data and
> returns.
> 
> rt version: 3.8.1
> OS version CentOS 5.2

If you're using mod_perl, Ruslan found some really excellent bugs with
running system commands under it.  If you can come up to 3.8.8, that
may fix it for you

-kevin

> First, here is the error message:
> 
> Jun 24 10:51:32 helpdesk RT: Ticket 9261 created in queue
> 'ClusterSupport' by johns276
> (/opt/rt3/bin/../lib/RT/Ticket_Overlay.pm:659)
> Jun 24 10:51:32 helpdesk RT: Attempted to commit a transaction with
> none in progress at
> /usr/lib/perl5/site_perl/5.8.8/DBIx/SearchBuilder/Handle.pm line 747
> 	DBIx
> ::SearchBuilder::Handle::EndTransaction('RT::Handle=HASH(0xba695a0)',
> 'Action', 'commit', 'Force', 'undef') called at /usr/lib/perl5/
> site_perl/5.8.8/DBIx/SearchBuilder/Handle.pm line 780 	
> DBIx::SearchBuilder::Handle::Commit('RT::Handle=HASH(0xba695a0)')
> called at /opt/rt3/bin/../lib/RT/Ticket_Overlay.pm line 675 	
> RT::Ticket::Create('RT::Ticket=HASH(0xc8b8798)', 'Requestor',
> 'ARRAY(0xc8a4df4)', 'DependsOn', 'ARRAY(0xc8bb6b8)', 'Cc',
> 'ARRAY(0xc8c1034)', 'RefersTo', 'ARRAY(0xc8bb7f0)', ...) called at /
> opt/rt3/bin/../local/lib/RT/Interface/Email/Filter/TakeAction.pm
> line 501 	
> RT::Interface::Email::Filter::TakeAction::GetCurrentUser('Message',
> 'MIME::Entity=HASH(0xc8af7fc)', 'RawMessageRef',
> 'SCALAR(0xc8afdc0)', 'CurrentUser',
> 'RT::CurrentUser=HASH(0xc862d80)', 'AuthLevel', 1, 'Action', ...)
> called at /opt/rt3/bin/../lib/RT/Interface/Email.pm line 1274 	RT::
> 
> The ticket is created but the commit fails. An attempt to view the
> ticket produces this error message: "Could not load ticket 9261"
> 
> Here is the scrip. It is attached to a particular queue
> (CustomerSupport).
> 
> # Condition: User defined
> if ($self->TransactionObj->Type eq 'Create')  {
>      return (1);
> }
> 
> # Action: User Defined
> # Custom action preparation code: Do nothing with the ticket
> 1;
> 
> # Custom action cleanup code:
> {
>    my $myId       = $self->TicketObj->EffectiveId;
>    my $mySubject  = $self->TicketObj->Subject;
> 
>    my $binary =
> '/home/alarmpoint/alarmpointsystems/integrationagent/
> bin/APClient.bin';
>    system($binary, '--map-data', 'vanderbilt', 'Cluster Group',
> $mySubject, 'RT', "RT $myId");
> 
>   1;
> }
> 
> #Template: Global Template: Blank
> 
> Any suggestions would be appreciated. The message is actually send
> to the webservice, since we can log in to the remote server and see
> that the data was sent appropriately. However, RT balks.
> 
> Thanks.
> 
> ~Charles~
> 
> --
> Charles Johnson, Vanderbilt University
> Advanced Computing Center for Research and Education
> Office: 615-343-4134
> Cell: 615-478-5743
> 
> Discover RT's hidden secrets with RT Essentials from O'Reilly Media.
> Buy a copy at http://rtbook.bestpractical.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 195 bytes
Desc: not available
URL: <http://lists.bestpractical.com/pipermail/rt-users/attachments/20100624/426e6573/attachment.sig>


More information about the rt-users mailing list