[rt-users] debugging a Create Ticket scrip

Jens Porup Jens.Porup at strategicdata.com.au
Wed Dec 14 01:08:35 EST 2005


G'day,

I'm trying to debug a scrip that is supposed to create a ticket
in a different queue, but doesn't. 

The rt.log gives me this:

	[Wed Dec 14 04:43:03 2005] [warning]: DBD::mysql::st execute failed: Column 'TimeTaken' cannot be null at /usr/share/perl5/DBIx/SearchBuilder/Handle.pm line 480.
	 (/usr/share/request-tracker3.4/lib/RT.pm:277)
	[Wed Dec 14 04:43:03 2005] [warning]: RT::Handle=HASH(0x87702bc) couldn't execute the query 'INSERT INTO Transactions (OldValue, NewReference, OldReference, NewValue, TimeTaken, Creator, ObjectId, Type, Field, ReferenceType, Created, Data, ObjectType) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)' at /usr/share/perl5/DBIx/SearchBuilder/Handle.pm line 494.
	 (/usr/share/request-tracker3.4/lib/RT.pm:277)
	[Wed Dec 14 04:43:03 2005] [warning]: Internal Error: Couldn't execute the query 'INSERT INTO Transactions (OldValue, NewReference, OldReference, NewValue, TimeTaken, Creator, ObjectId, Type, Field, ReferenceType, Created, Data, ObjectType) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)'Column 'TimeTaken' cannot be null (/usr/share/request-tracker3.4/lib/RT/Record.pm:1393)


Is this is any way related or relevant? 

How can I get relevant debugging information about why the scrip is failing?

My custom condition looks like this:

	if (
		($self->TransactionObj->Type eq "CustomField") and
		(
			($self->TransactionObj->NewValue =~ /partial delivery/i)
		||
			($self->TransactionObj->NewValue =~ /received in full/i)
		)    
	)
	  return(1);
	}
	else
	{
	  return(undef);
	}

And my template looks like this:

	===Create-Ticket: inventory ticket
	Queue: Inventory
	Subject: Inventory Ticket for {$Tickets{'TOP'}->Subject}
	RefersTo: { $Tickets{'TOP'}->Id() }
	Content: There has been a partial or full delivery from a purchase order you requested. Please fill out the inventory now before you forget.
	ENDOFCONTENT


I've tried putting RT::Logger->error() statements in the scrip cleanup code but nothing comes
out in the logs. I'm stumped!

Ideas much appreciated.

Thanks,

Jens




More information about the rt-users mailing list