[rt-devel] Incorrect setting of Time Resolved with multiple inactive states?

Kevin Falcone falcone at bestpractical.com
Wed Apr 3 15:20:32 EDT 2013


On Wed, Apr 03, 2013 at 10:31:58AM +0200, Davide Imbeni wrote:
> I have a question / request regarding the setting of Resolved Time for a Ticket that changes status.
> I read in the docs that:
> 
> RT will automatically set the Resolved date when a ticket's status is changed from an Initial or Active status to an Inactive status.
> 
> What I observed is instead that RT automatically set the Resolved date when a ticket's status is changed to an Inactive status, regardless of the original status.
> 
> This might seem a small distinction, but with my Lifecycle it makes an important difference.

This dates from the time when for most RTs, you really only had 2
inactive statuses (yes you could add more, but most people didn't).
You were rejecting or resolving a ticket and rarely cared about
toggling between them.

> 
> --- Ticket.pm.orig	2013-04-02 17:14:45.000000000 +0200
> +++ Ticket.pm	2013-04-02 17:44:38.000000000 +0200
> @@ -3149,7 +3149,7 @@
>  
>      #When we close a ticket, set the 'Resolved' attribute to now.
>      # It's misnamed, but that's just historical.
> -    if ( $lifecycle->IsInactive($new) ) {
> +    if ( $lifecycle->IsInactive($new) && !($lifecycle->IsInactive($old)) ) {
>          $self->_Set(
>              Field             => 'Resolved',
>              Value             => $now->ISO,

This sort of change is something that we could never do in 4.0 but
could be a consideration for 4.2.  A change that would be even better
for 4.2 is killing this code and adding a Scrip "On Status Change from
Active to Inactive Set Resolved".  It's not terribly complicated and
would allow admins a *lot* more flexibility to control when Resolved
is set.

-kevin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 235 bytes
Desc: not available
URL: <http://lists.bestpractical.com/pipermail/rt-devel/attachments/20130403/63e861e1/attachment.pgp>


More information about the rt-devel mailing list