Help with error

I just upgraded our development RT from 3.6.5 to 3.6.6. In the process
SearchBuilder was upgraded to 1.51. And reapplied the priority-labels
patch from the Wiki. Everything seems to be working correctly except
for creating a ticket using the web interface. The error I’m seeing is
as follows:

[Wed Jan 30 17:01:12 2008] [crit]: Couldn’t create a ticket: Internal
Error: Couldn’t execute the query ‘INSERT INTO Tickets (Status, Queue,
Started, Type, InitialPriority, Starts, LastUpdated, Subject,
FinalPriority, Creator, Owner, LastUpdatedBy, Resolved, Created,
Priority, Due) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)’
(/opt/rt3/lib/RT/Ticket_Overlay.pm:602)

I’m not sure how or why this is happening. First I checked what the
Priority Labels patch changed, and from what I can tell it shouldn’t
affect the insert values being ‘?’. I tracked the process to insert a
ticket and saw the following in SearchBuilder/Handle.pm.

sub InsertQueryString {

my($self, $table, @pairs) = @_;

my(@cols, @vals, @bind);



while ( my $key = shift @pairs ) {

    push @cols, $key;

    push @vals, '?';

    push @bind, shift @pairs;

}



my $QueryString = "INSERT INTO $table";

$QueryString .= " (". join(", ", @cols) .")";

$QueryString .= " VALUES (". join(", ", @vals). ")";

return ($QueryString, @bind);

}

Now I’m no Perl expert, but wouldn’t pushing ‘?’ result in all the @vals
being ‘?’… or am I just going crazy from staring at code for too long?

Any ideas on how to fix this error, or at least help me figure out what
I broke.

Joshua P Speicher

Web Developer/Security Engineer

TekSecure Labs (sm)

(a division of Tekmark Global Solutions)

This message is for the designated recipient only and it, as well as any attachments, may contain privileged, proprietary or confidential information. If you are not the intended recipient, do not read, copy or distribute it. Please notify the sender immediately and delete the original at once. Any other use of the email by you is prohibited. Thank you.

Can someone help with this error in apache. Not sure on where to start
to fix it.

RT 3.0.5
Apache 1.3.28 modperl statically compiled
Perl 5.8

Thanks

[Wed Sep 24 09:45:02 2003] [error]: Scrip 31 Commit failed:
RT::ticket::NewValue Unimplemented in RT::Action::UserDefined. ((eval
1945) line 3)

Stack:
[/usr/lib/perl5/site_perl/5.8.0/DBIx/SearchBuilder/Record.pm:457]
[(eval 1945):3]
[/opt/rt3/lib/RT/ScripAction_Overlay.pm:207]
[/opt/rt3/lib/RT/Scrip_Overlay.pm:409]
[/opt/rt3/lib/RT/Scrip_Overlay.pm:344]
[/opt/rt3/lib/RT/Transaction_Overlay.pm:169]
[/opt/rt3/lib/RT/Ticket_Overlay.pm:3799]
[/opt/rt3/lib/RT/Ticket_Overlay.pm:3908]
[/opt/rt3/lib/RT/Ticket_Overlay.pm:3317]
[/opt/rt3/lib/RT/Interface/Web.pm:944]
[/opt/rt3/lib/RT/Interface/Web.pm:1066]
[/opt/rt3/share/html/RTIR/Incident/BulkReply.html:125]
[/opt/rt3/share/html/RTIR/autohandler:2]
[/opt/rt3/share/html/autohandler:182]
(/opt/rt3/lib/RT/Action/UserDefined.pm:59)

You’ve got SCRIP #31 that is User defined.
And in Action commit block this scrip call NewValue function on object
that have type RT::Ticket, but RT::Ticket don’t have such method.
Cat here this block if you want.
Best regards. Ruslan.

Dan Fiorito wrote:

Ok here is the offending scrip

Condition = On Status Change

No Custom Condition defined

Action = User Defined

Custom action preparation code: 1

Custom action cleanup code:

-------------------------------------------------------------------

if ($self->TicketObj->NewValue eq ‘resolved’ or
$self->TicketObj->NewValue eq ‘rejected’) {
my $members = $self->TicketObj->Members;
while (my $link = $members->Next) {
my $member= $link->BaseObj;
if ($member->QueueObj->Name eq ‘Blocks’ or
$member->QueueObj->Name eq ‘Investigations’ or
$member->QueueObj->Name eq ‘Incident Reports’) {
$member->Resolve();
}
}
}

-------------------------------------------------------------------

Template: Global Template: BlankFrom: Ruslan U. Zakirov [mailto:cubic@acronis.ru]
Sent: Thursday, September 25, 2003 11:14 AM
To: Dan Fiorito
Cc: rt-users@lists.fsck.com
Subject: Re: [rt-users] Help with error

You’ve got SCRIP #31 that is User defined.
And in Action commit block this scrip call NewValue function on object
that have type RT::Ticket, but RT::Ticket don’t have such method. Cat
here this block if you want.
Best regards. Ruslan.

Dan Fiorito wrote:

Can someone help with this error in apache. Not sure on where to start
to fix it.

RT 3.0.5
Apache 1.3.28 modperl statically compiled
Perl 5.8

Thanks

[Wed Sep 24 09:45:02 2003] [error]: Scrip 31 Commit failed:
RT::ticket::NewValue Unimplemented in RT::Action::UserDefined. ((eval
1945) line 3)

Stack:
[/usr/lib/perl5/site_perl/5.8.0/DBIx/SearchBuilder/Record.pm:457]
[(eval 1945):3]
[/opt/rt3/lib/RT/ScripAction_Overlay.pm:207]
[/opt/rt3/lib/RT/Scrip_Overlay.pm:409]
[/opt/rt3/lib/RT/Scrip_Overlay.pm:344]
[/opt/rt3/lib/RT/Transaction_Overlay.pm:169]
[/opt/rt3/lib/RT/Ticket_Overlay.pm:3799]
[/opt/rt3/lib/RT/Ticket_Overlay.pm:3908]
[/opt/rt3/lib/RT/Ticket_Overlay.pm:3317]
[/opt/rt3/lib/RT/Interface/Web.pm:944]
[/opt/rt3/lib/RT/Interface/Web.pm:1066]
[/opt/rt3/share/html/RTIR/Incident/BulkReply.html:125]
[/opt/rt3/share/html/RTIR/autohandler:2]
[/opt/rt3/share/html/autohandler:182]
(/opt/rt3/lib/RT/Action/UserDefined.pm:59)


TicketObj should be TransactionObj there.

Did that come out of core RTIR? If so, it needs to be fixed up.On Thu, Sep 25, 2003 at 01:43:38PM -0400, Dan Fiorito wrote:

Ok here is the offending scrip

Condition = On Status Change

No Custom Condition defined

Action = User Defined

Custom action preparation code: 1

Custom action cleanup code:

-------------------------------------------------------------------

if ($self->TicketObj->NewValue eq ‘resolved’ or
$self->TicketObj->NewValue eq ‘rejected’) {
my $members = $self->TicketObj->Members;
while (my $link = $members->Next) {
my $member= $link->BaseObj;
if ($member->QueueObj->Name eq ‘Blocks’ or
$member->QueueObj->Name eq ‘Investigations’ or
$member->QueueObj->Name eq ‘Incident Reports’) {
$member->Resolve();
}
}
}

-------------------------------------------------------------------

Template: Global Template: Blank

-----Original Message-----
From: Ruslan U. Zakirov [mailto:cubic@acronis.ru]
Sent: Thursday, September 25, 2003 11:14 AM
To: Dan Fiorito
Cc: rt-users@lists.fsck.com
Subject: Re: [rt-users] Help with error

You’ve got SCRIP #31 that is User defined.
And in Action commit block this scrip call NewValue function on object
that have type RT::Ticket, but RT::Ticket don’t have such method. Cat
here this block if you want.
Best regards. Ruslan.

Dan Fiorito wrote:

Can someone help with this error in apache. Not sure on where to start
to fix it.

RT 3.0.5
Apache 1.3.28 modperl statically compiled
Perl 5.8

Thanks

[Wed Sep 24 09:45:02 2003] [error]: Scrip 31 Commit failed:
RT::ticket::NewValue Unimplemented in RT::Action::UserDefined. ((eval
1945) line 3)

Stack:
[/usr/lib/perl5/site_perl/5.8.0/DBIx/SearchBuilder/Record.pm:457]
[(eval 1945):3]
[/opt/rt3/lib/RT/ScripAction_Overlay.pm:207]
[/opt/rt3/lib/RT/Scrip_Overlay.pm:409]
[/opt/rt3/lib/RT/Scrip_Overlay.pm:344]
[/opt/rt3/lib/RT/Transaction_Overlay.pm:169]
[/opt/rt3/lib/RT/Ticket_Overlay.pm:3799]
[/opt/rt3/lib/RT/Ticket_Overlay.pm:3908]
[/opt/rt3/lib/RT/Ticket_Overlay.pm:3317]
[/opt/rt3/lib/RT/Interface/Web.pm:944]
[/opt/rt3/lib/RT/Interface/Web.pm:1066]
[/opt/rt3/share/html/RTIR/Incident/BulkReply.html:125]
[/opt/rt3/share/html/RTIR/autohandler:2]
[/opt/rt3/share/html/autohandler:182]
(/opt/rt3/lib/RT/Action/UserDefined.pm:59)



rt-users mailing list
rt-users@lists.fsck.com
http://lists.fsck.com/mailman/listinfo/rt-users

Have you read the FAQ? The RT FAQ Manager lives at http://fsck.com/rtfm

Request Tracker... So much more than a help desk — Best Practical Solutions – Trouble Ticketing. Free.