[rt-users] problems with Callbacks
Pieter van der Spek
pieter at West.NL
Wed Jun 29 08:57:37 EDT 2005
I'm trying to create the following callback:
-------------------------------
<%init>
if ($Ticket) {
# overwrite the default Action for Resolve to Correspond
if ( $Ticket->CurrentUserHasRight('ModifyTicket')
&& ( $Ticket->Status ne 'resolved' ) ) {
$actions->{'B'}->{'path'} =
"Ticket/Update.html?Action=Respond&DefaultStatus=resolved&id=" . $Ticket->id ;
}
}
</%init>
<%args>
$Ticket => undef
$actions => undef
</%args>
-------------------------------
However, this results in the following error:
-------------------------------
error:
Error during compilation of
/usr/local/share/request-tracker3.4/html/Callbacks/West/Ticket/Elements/Tabs/Default:
Global symbol "$actions" requires explicit package name at
/usr/local/share/request-tracker3.4/html/Callbacks/West/Ticket/Elements/Tabs/Default
line 6.
context:
...
2: if ($Ticket) {
3: # overwrite the default Action for Resolve to Correspond
4: if ( $Ticket->CurrentUserHasRight('ModifyTicket')
5: && ( $Ticket->Status ne 'resolved' ) ) {
6: $actions->{'B'}->{'path'} =
"Ticket/Update.html?Action=Respond&DefaultStatus=resolved&id=" . $Ticket->id ;
7: }
8: }
9: </%init>
10: <%args>
...
code stack: /usr/share/perl5/HTML/Mason/Interp.pm:317
/usr/share/perl5/HTML/Mason/Request.pm:892
/usr/share/perl5/HTML/Mason/Request.pm:996
/usr/share/request-tracker3.4/html/Elements/Callback:70
/usr/share/request-tracker3.4/html/Ticket/Elements/Tabs:46
/usr/share/request-tracker3.4/html/Ticket/Display.html:48
/usr/share/request-tracker3.4/html/autohandler:215
-------------------------------
I'm using the request-tracker3.4 package on Debian Sarge.
--
-- Pieter van der Spek, pieter at west.nl, West Consulting B.V., +31 15 2191 600
More information about the rt-users
mailing list