[rt-users] Error with custom scrip action
Oluwatomisin Ilori
tomisilori at yahoo.co.uk
Mon Feb 28 05:15:08 EST 2005
Thanks Andy for the scrip, I created the scrip as follows but still got the following error, pls can u help me decode this. I don't know why I'm getting this error "Can't call method "TicketObj" on an undefined value" . Pls, can anyone help out:
My Scrip is given below:
Description:AddWatcherRegionEast
Custom Condition: user defined
return undef unless ($self->TransactionObj->Type eq "Create");
return undef unless ($self->TicketObj->FirstCustomFieldValue('Region') =~ /RegionEast/i);
return 1;
Custom action prep:
my ($status, $msg) = $self->TicketObj->AddWatcher(Type => 'Cc', Email => "tola\@net2g.net" );
return 1;
custom action cleanup code:
return 1;
The error i got is:
[Mon Feb 28 13:14:49 2005] [info]: Successful login for customercare from 10.50.1.107 (/opt/rt3/share/html/autohandler:197)
[Mon Feb 28 13:15:19 2005] [debug]: About to think about scrips for transaction #2316 (/opt/rt3/lib/RT/Transaction_Overlay.pm:154)
[Mon Feb 28 13:15:19 2005] [debug]: About to think about scrips for transaction #2317 (/opt/rt3/lib/RT/Transaction_Overlay.pm:154)
[Mon Feb 28 13:15:19 2005] [debug]: About to think about scrips for transaction #2318 (/opt/rt3/lib/RT/Transaction_Overlay.pm:154)
[Mon Feb 28 13:15:19 2005] [debug]: About to think about scrips for transaction #2319 (/opt/rt3/lib/RT/Transaction_Overlay.pm:154)
[Mon Feb 28 13:15:20 2005] [debug]: About to think about scrips for transaction #2320 (/opt/rt3/lib/RT/Transaction_Overlay.pm:154)
[Mon Feb 28 13:15:20 2005] [debug]: About to prepare scrips for transaction #2320 (/opt/rt3/lib/RT/Transaction_Overlay.pm:158)
[Mon Feb 28 13:15:20 2005] [debug]: Found 2 scrips (/opt/rt3/lib/RT/Scrips_Overlay.pm:354)
[Mon Feb 28 13:15:20 2005] [error]: Template parsing error: Can't call method "TicketObj" on an undefined value at template line 8.
Stack:
[template:8]
[/opt/rt3/lib/RT/Template_Overlay.pm:416]
[/opt/rt3/lib/RT/Template_Overlay.pm:340]
[/opt/rt3/lib/RT/Action/SendEmail.pm:112]
[/opt/rt3/lib/RT/Action/Notify.pm:65]
[/opt/rt3/lib/RT/ScripAction_Overlay.pm:220]
[/opt/rt3/lib/RT/Scrip_Overlay.pm:477]
[/opt/rt3/lib/RT/Scrips_Overlay.pm:235]
[/opt/rt3/lib/RT/Transaction_Overlay.pm:160]
[/opt/rt3/lib/RT/Record.pm:1373]
[/opt/rt3/lib/RT/Ticket_Overlay.pm:720]
[/opt/rt3/lib/RT/Interface/Web.pm:385]
[/opt/rt3/share/html/Ticket/Display.html:101]
[/opt/rt3/share/html/Ticket/Create.html:288]
[/opt/rt3/share/html/autohandler:215]
(/opt/rt3/lib/RT/Template_Overlay.pm:412)
[Mon Feb 28 13:15:20 2005] [error]: error: unexpected end of header
(/opt/rt3/lib/RT/Template_Overlay.pm:366)
[Mon Feb 28 13:15:20 2005] [debug]: About to commit scrips for transaction #2320 (/opt/rt3/lib/RT/Transaction_Overlay.pm:167)
[Mon Feb 28 13:15:20 2005] [info]: Ticket 189 created in queue 'General' by customercare (/opt/rt3/lib/RT/Ticket_Overlay.pm:730)
Send instant messages to your online friends http://uk.messenger.yahoo.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.bestpractical.com/pipermail/rt-users/attachments/20050228/93146148/attachment.htm>
More information about the rt-users
mailing list