Setting TimeWorked in lifecycle

In our RT3.8.9 setup, I had customized the Tickets/Elements/Tabs to have a QuickResolve for when you could just look at a ticket and resolve it with no further action: for example, a known false positive virus alert, using:
if ( $can{‘ModifyTicket’} ) {
if ( $Ticket->Status ne ‘resolved’ ) {
$actions->{‘Acc’} = {
path => “Ticket/Display.html?Status=resolved&id=$id&UpdateTimeWorked=1”,
title => loc(‘Quick Resolve’),
};
}
}

Now that RT 4 uses lifecycles, I’m not sure how to accomplish this same thing using lifecycles in RT_SiteConfig.pm. The documentation in RT_Config is less than helpful for anything but stock behavior: show the update page or just change a status, but it isn’t very flexible beyond that. Am I missing something? Even a wiki page addressing lifecycles in some fashion?

Thanks in advance for any help someone can give.

Drew Barnes
Applications Analyst
Network Resources Dept.
Raymond Walters College

Now that RT 4 uses lifecycles, I’m not sure how to accomplish this same thing using lifecycles
in RT_SiteConfig.pm. The documentation in RT_Config is less than helpful for anything but
stock behavior: show the update page or just change a status, but it isn’t very flexible
beyond that. Am I missing something? Even a wiki page addressing lifecycles in some fashion?

I don’t believe lifecycles currently offers you the flexibility of
adding a tab like that (although adding the Quick Resolve portion is
trivial, and if it isn’t clear from the docs, a bug report about how
to make it clearer would be great. We’ve added just such a tab on
issues.bestpractical.com so we can quick resolve things).

You’re going to need to use one of the Elements/Tabs callbacks to
modify the link for the Quick Resolve action to include
UpdateTimeWorked. You’ll find the PageMenu() method available from
your callback useful, and the docs in RT::Interface::Web::Menu may be
helpful for navigating the data structure.

-kevin

Now that RT 4 uses lifecycles, I’m not sure how to accomplish this
same thing using lifecycles
in RT_SiteConfig.pm. The documentation in RT_Config is less than
helpful for anything but
stock behavior: show the update page or just change a status, but it
isn’t very flexible
beyond that. Am I missing something? Even a wiki page addressing
lifecycles in some fashion?

I don’t believe lifecycles currently offers you the flexibility of
adding a tab like that (although adding the Quick Resolve portion is
trivial, and if it isn’t clear from the docs, a bug report about how
to make it clearer would be great. We’ve added just such a tab on
issues.bestpractical.com so we can quick resolve things).

You’re going to need to use one of the Elements/Tabs callbacks to
modify the link for the Quick Resolve action to include
UpdateTimeWorked. You’ll find the PageMenu() method available from
your callback useful, and the docs in RT::Interface::Web::Menu may be
helpful for navigating the data structure.

-kevin

I was, indeed, able to get my lifecycle to do a QuickResolve without
logging time. The documentation is pretty clear on that, I just couldn’t
find any other references to lifecycles anywhere else.

For the moment I have hacked /Elements/Tabs to do it the quick and dirty
way while I work on a dev box to get it done in a more “proper” way.
Appreciate the pointers, I will spend some time breaking the dev box and
report back in case this is something someone else has interest in.

Drew Barnes
Applications Analyst
Network Resources Dept.
Raymond Walters College

Now that RT 4 uses lifecycles, I’m not sure how to accomplish this same thing using lifecycles
in RT_SiteConfig.pm. The documentation in RT_Config is less than helpful for anything but
stock behavior: show the update page or just change a status, but it isn’t very flexible
beyond that. Am I missing something? Even a wiki page addressing lifecycles in some fashion?

I don’t believe lifecycles currently offers you the flexibility of
adding a tab like that (although adding the Quick Resolve portion is
trivial, and if it isn’t clear from the docs, a bug report about how
to make it clearer would be great. We’ve added just such a tab on
issues.bestpractical.com so we can quick resolve things).

RTIR’s 2.9 branch has code that allows to pass more arguments. It
should be ported into RT 4.

You’re going to need to use one of the Elements/Tabs callbacks to
modify the link for the Quick Resolve action to include
UpdateTimeWorked. You’ll find the PageMenu() method available from
your callback useful, and the docs in RT::Interface::Web::Menu may be
helpful for navigating the data structure.

-kevin

Best regards, Ruslan.