Hi Rod,
Checking the Wiki I didn’t see any mention of a method to
Resolve a Ticket ( within RT ) with one click - no comment no
submit changes button. Just Resolve the ticket.
And even better would be that only the Owner could do this.
Anyone else would be, given their permissions, sent to the
normal Comment/Resolve page or error page.
I could do this via a separate web page but it would be a
good-thing to do it from within RT.
Looks to be a customization of the Ticket Display page and a
custom action.
Anyone done this?
Assuming you havn’t already resolved this issue…
I did something similar for moving spam to a SPAM queue and
setting it to status deleted.
Create a local/html/Callbacks/Ticket/Elements/Tabs/Default:
<%INIT>
if($Ticket) {
$actions->{‘just-resolve’} = { title => loc(‘Just Resolve’),
path => ‘myhacks/JustResolve.html?id=’.$Ticket->id };
}
</%INIT>
<%ARGS>
$Ticket => undef;
$tabs => undef;
$actions => undef;
</%ARGS>
This adds the ‘Just Resolve’ option to the list.
Then create local/html/myhacks/JustResolve.html:
<%INIT>
my $TicketObj = LoadTicket($id);
$TicketObj->SetStatus(“resolved”);
$m->comp(‘/Ticket/Display.html’, id => $id);
return;
</%INIT>
<%ARGS>
$id => undef
</%ARGS>
This performs the work when you hit ‘Just Resolve’.
You’ll now need to patch the ticket modification page to make
sure that it goes back to the $RT::WebPath when you go back to display:
— share/html/Ticket/Modify.html 2005-04-18 02:44:23.000000000 +0100
+++ local/html/Ticket/Modify.html 2006-02-23 09:28:41.000000000 +0000
@@ -49,7 +49,7 @@
Title => loc(‘Modify ticket #[_1]’, $TicketObj->Id) &>
<& /Elements/ListActions, actions => @results &>
-
+
<& /Elements/TitleBoxStart, title => loc(‘Modify ticket #[_1]’,$TicketObj->Id), color=> “#993333”, width => “100%” &>
I can’t remember the exact reason this was needed now. I think it
was something to do with the comp(‘Ticket/Display.html’…) trying to
go to myhacks/Ticket/Display.html. Try without and you’ll see the error.
Restart your web server and you should now see a ‘Just Resolve’ option
listed along with the standard Reply, resolve etc…
I’ve pieced this together from the stuff I have, so there might be
the odd typo. Sorry for not seeing your post earlier
Regards, Ian.