[rt-users] using callback in Ticket/Elements/Tabs to change Resolve action

Roderick Schertler roderick at argon.org
Thu Oct 16 16:10:12 EDT 2003


I'd like to change the "Resolve" action in the per-ticket tabs so that
it sends a response rather than a comment by default.  (I'm curious
about the reasoning for the current default.  It seems strange to me,
but maybe I just don't get it.)

I made it work the way I want by copying html/Ticket/Elements/Tabs to
/usr/local/share and editing it (

--- Tabs.~1~	Tue Jul 29 05:25:24 2003
+++ Tabs	Thu Oct 16 12:05:38 2003
@@ -127,7 +127,7 @@
     if ( $Ticket->Status ne 'resolved' ) {
         $actions->{'B'} = {
 
-            path => "Ticket/Update.html?Action=Comment&DefaultStatus=resolved&id=" . $id,
+            path => "Ticket/Update.html?Action=Respond&DefaultStatus=resolved&id=" . $id,
             title => loc('Resolve') };
     }
     if ( $Ticket->Status ne 'open' ) {

) but I hate having to copy the whole file like that.

Is there a way to do this via the callback which is already there
in Ticket/Elements/Tabs?  I wouldn't think so because $actions is
lexical, plus the $actions->{'B'} assignment isn't using ||=.  Is
there an approach which would work?

I'm using the Debian testing build of RT 3.0.4.

-- 
Roderick Schertler
roderick at argon.org



More information about the rt-users mailing list