[rt-users] Customization / Callback Question for "Ticket/Elements/Tabs".
Nehmer Torben
torben.nehmer at cancom.de
Wed Jul 21 03:50:49 EDT 2010
Good morning,
I am currently trying to customize RTs Action Listing in the top of the Ticket Display (Comment, Correspond, Forward, Resolve). I am using callbacks, but they do not invoke as expected. As a basic idea I have been using the example of Dirk Pape, specifically http://page.mi.fu-berlin.de/dirkpape/rt3/Callbacks/MI/Ticket/Elements/Tabs/Default
The code I am actually using looks like this:
<%INIT>
if ($Ticket) {
# overwrite the default Action for Resolve to Correspond
if ( $Ticket->CurrentUserHasRight('ModifyTicket') && ( $Ticket->Status ne 'resolved' ) ) {
$actions->{'G'}->{'path'} = "Ticket/Update.html?Action=Respond&DefaultStatus=resolved&id=".$Ticket->id;
}
# Set To Test
if ( $Ticket->CurrentUserHasRight('ModifyTicket') && ( $Ticket->Status ne 'test' ) ) {
$actions->{'T'} = {
title => 'Test',
path => "Ticket/Update.html?Action=Respond&DefaultStatus=test&id="
. $Ticket->id };
}
# Add as Watcher
if ( $Ticket->CurrentUserHasRight('Watch') ) {
$actions->{'W'} = {
title => loc('Watch'),
path => 'Ticket/ModifyPeople.html?Ticket-AddWatcher-Principal-'
. $Ticket->CurrentUser->id
. '=Cc&id='.$Ticket->id };
}
}
# $actions->{'ZZ2'} = { title => 'test2', path => 'test2' };
</%INIT>
<%ARGS>
$Ticket => undef
$actions => undef
</%ARGS>
The callback actually gets called, if I uncomment the "ZZ2" entry, it gets shown as expected. Unfortunately, the $Ticket object is undefined and thus breaks the entire idea.
I am using RT 3.8.8 installed from Debian packages, the callback has been placed into /usr/local/share/request-tracker3.8/html/Callbacks/Ticket/Elements/Tabs/Default.
I would appreciate any hints, why this does not work.
Best regards,
Torben Nehmer
-------
Torben Nehmer
Diplom Informatiker (FH)
Business System Developer
CANCOM Deutschland GmbH
Messerschmittstr. 20
89343 Scheppach
Germany
Tel.: +49 8225 - 996-1118
Fax: +49 8225 - 996-41118
torben.nehmer at cancom.de<mailto:torben.nehmer at cancom.de>
www.cancom.de<http://www.cancom.de>
CANCOM Deutschland GmbH
Sitz der Gesellschaft: Jettingen-Scheppach
HRB 10653 Memmingen
Geschäftsführer: Martin Mayr, Tobias Hörmann
Diese E-Mail und alle mitgesendeten Dateien sind vertraulich und ausschließlich für den Gebrauch durch den Empfänger bestimmt!
This e-mail and any files transmitted with it are confidential intended solely for the use of the addressee!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.bestpractical.com/pipermail/rt-users/attachments/20100721/71997ba6/attachment.htm>
More information about the rt-users
mailing list