Custom links in ticket display?

At the top of each ticket view there’s a menu of links, typically
containing “Open - Steal — Comment - Reply - Forward - Resolve”.

Is there a way to add an extra item to this menu ? I’m thinking a
"Reject" shortcut which would link to the same ticket resolution form
as “Resolve”, except with “DefaultStatus=rejected”.

About the only thing I could find that’s configurable related to this
is “Set($ResolveDefaultUpdateType, ‘Comment’);”, which I could
presumably use to have the closing comments be visible to the
requestor. But I’d like to add a convenient “Reject” link side by side
with “Resolve”, and wonder if it’s possible at all ?

Thanks much,
–Gabriel

Hi,

First off, what version of RT are you using? The option I’m mentioning here
are for RT 4, I’m nut sure if they will work with older versions.

It should be possible to change the actions directly shown at the top of a
ticket, but I’m not sure how to nicely change that menu (without breaking
it during an update).

However, it’s possible to modify the actions menu using the Lifecycles
configuration in your RT_SiteConfig.
What we did was copy the entire Lifecycles config from the RT_Config to the
RT_SiteConfig and modified it to our liking.

This allows you to create custom statuses but also define actions which are
shown in your action menu.
The below configuration is a little Dutch, but I think you should be able
to figure out most of the parameters listed in it.

Especially the first section is interesting, the second section is for
approvals which we don’t use.

Ticket Lifecycles

Set(%Lifecycles,
default => {
initial => [ ‘new’ ],
active => [ ‘open’, ‘Bij_Leverancier’, ‘Bij_Aanvrager’, ‘Intern’, ‘stalled’
],
inactive => [ ‘resolved’, ‘rejected’, ‘spam’, ‘deleted’ ],

defaults => {
on_create => ‘new’,
on_merge => ‘resolved’,
approved => ‘open’,
denied => ‘rejected’,
},

transitions => {
‘’ => [qw(new open resolved spam)],
new => [qw(open Bij_Leverancier Bij_Aanvrager Intern stalled resolved
rejected spam deleted)],
open => [qw(new Bij_Leverancier Bij_Aanvrager Intern stalled resolved
rejected spam deleted)],
Bij_Leverancier => [qw(new open Bij_Aanvrager Intern stalled resolved
rejected spam deleted)],
Bij_Aanvrager => [qw(new open Bij_Leverancier Intern stalled resolved
rejected spam deleted)],
Intern => [qw(new open Bij_Leverancier Bij_Aanvrager stalled resolved
rejected spam deleted)],
stalled => [qw(new open Bij_Leverancier Bij_Aanvrager Intern rejected
resolved spam deleted)],
resolved => [qw(new open Bij_Leverancier Bij_Aanvrager Intern stalled
rejected spam deleted)],
rejected => [qw(new open Bij_Leverancier Bij_Aanvrager Intern stalled
resolved spam deleted)],
spam => [qw(new open Bij_Leverancier Bij_Aanvrager Intern stalled rejected
resolved deleted)],
deleted => [qw(new open Bij_Leverancier Bij_Aanvrager Intern stalled
rejected resolved spam)],
},

rights => {
‘* → deleted’ => ‘DeleteTicket’,
‘* → *’ => ‘ModifyTicket’,
},

actions => [
‘new → open’ => { label => ‘Openen’, update => ‘Respond’, },
‘new → resolved’ => { label => ‘Oplossen’, update => ‘Comment’, },
‘open → stalled’ => { label => ‘Parkeren’, update => ‘Comment’, },
‘open → resolved’ => { label => ‘Oplossen’, update => ‘Comment’, },
‘new → Bij_Leverancier’ => { label => ‘Naar Leverancier’, update =>
‘Respond’, },
‘open → Bij_Leverancier’ => { label => ‘Naar Leverancier’, update =>
‘Respond’, },
‘new → Bij_Aanvrager’ => { label => ‘Naar Aanvrager’, update => ‘Respond’,
},
‘open → Bij_Aanvrager’ => { label => ‘Naar Aanvrager’, update =>
‘Respond’, },
‘Bij_Leverancier → open’ => { label => ‘Openen’, },
‘Bij_Aanvrager → open’ => { label => ‘Openen’, },
‘Intern → open’ => { label => ‘Openen’, },
‘stalled → open’ => { label => ‘Openen’, },
‘resolved → open’ => { label => ‘Heropenen’, update => ‘Comment’, },
‘rejected → open’ => { label => ‘Heropenen’, update => ‘Comment’, },
‘deleted → open’ => { label => ‘Undelete’, },
‘spam → open’ => { label => ‘Geen Spam’, update => ‘Comment’, },
‘new → spam’ => { label => ‘SPAM’, },
‘open → spam’ => { label => ‘SPAM’, },
],
},

Don’t change lifecyle of the approvals, they are not capable to deal with

custom statuses!

approvals => {
initial => [ ‘new’ ],
active => [ ‘open’, ‘stalled’ ],
inactive => [ ‘resolved’, ‘rejected’, ‘deleted’ ],

defaults => {
on_create => ‘new’,
on_merge => ‘resolved’,
},

transitions => {
‘’ => [qw(new open resolved)],
new => [qw(open stalled resolved rejected deleted)],
open => [qw(new stalled resolved rejected deleted)],
stalled => [qw(new open rejected resolved deleted)],
resolved => [qw(new open stalled rejected deleted)],
rejected => [qw(new open stalled resolved deleted)],
deleted => [qw(new open stalled rejected resolved)],
},

rights => {
‘* → deleted’ => ‘DeleteTicket’,
‘* → rejected’ => ‘ModifyTicket’,
‘* → *’ => ‘ModifyTicket’,
},

actions => [
‘new → open’ => { label => ‘Openen’, update => ‘Respond’, },
‘new → resolved’ => { label => ‘Oplossen’, update => ‘Comment’, },
‘new → rejected’ => { label => ‘Weigeren’, update => ‘Respond’, },
‘new → deleted’ => { label => ‘Verwijderen’, },
‘open → stalled’ => { label => ‘Perkeren’, update => ‘Comment’, },
‘open → resolved’ => { label => ‘Oplossen’, update => ‘Comment’, },
‘open → rejected’ => { label => ‘Weigeren’, update => ‘Respond’, },
‘stalled → open’ => { label => ‘Openen’, },
‘resolved → open’ => { label => ‘Heropenen’, update => ‘Comment’, },
‘rejected → open’ => { label => ‘Heropenen’, update => ‘Comment’, },
‘deleted → open’ => { label => ‘Undelete’, },
],
},
);

We found that this is a nice and clean way for creating custom actions, the
downside is that they are shown under the actions dropdown instead of
directly in the horizontal menu.

I hope this helps a little, maybe someone else can elaborate on how to do a
proper change of the horizontal menu (maybe using callbacks???).

Bart2012/9/25 Gabriel L. Somlo gsomlo@gmail.com

At the top of each ticket view there’s a menu of links, typically
containing “Open - Steal — Comment - Reply - Forward - Resolve”.

Is there a way to add an extra item to this menu ? I’m thinking a
“Reject” shortcut which would link to the same ticket resolution form
as “Resolve”, except with “DefaultStatus=rejected”.

About the only thing I could find that’s configurable related to this
is “Set($ResolveDefaultUpdateType, ‘Comment’);”, which I could
presumably use to have the closing comments be visible to the
requestor. But I’d like to add a convenient “Reject” link side by side
with “Resolve”, and wonder if it’s possible at all ?

Thanks much,
–Gabriel


Final RT training for 2012 in Atlanta, GA - October 23 & 24
http://bestpractical.com/training

We’re hiring! Careers — Best Practical Solutions