[rt-users] using callback in Ticket/Elements/Tabs to change Resolve action
Jesse Vincent
jesse at bestpractical.com
Mon Oct 20 21:27:04 EDT 2003
On Thu, Oct 16, 2003 at 04:10:12PM -0400, Roderick Schertler wrote:
> 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?
Passing $actions to a callback that's called _after_ the tabs are all
set would probably do it. I'll take a patch (and a recommendation for
general actions hash design ;)
> I'm using the Debian testing build of RT 3.0.4.
>
> --
> Roderick Schertler
> roderick at argon.org
> _______________________________________________
> rt-users mailing list
> rt-users at 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
>
--
http://www.bestpractical.com/rt -- Trouble Ticketing. Free.
More information about the rt-users
mailing list