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

Tim Cutts tjrc at sanger.ac.uk
Wed Apr 3 04:47:51 EDT 2013

> --- 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,
> Now my questions: 
> - Could this patch be incorporated in new releases of RT as a bugfix, or there are actual reasons for the current behavior I did not think about? 

It's not my place to say, since I'm not a BestPractical developer, but it seems sensible logic to me.

> - IF the latter is the case, are there better ways for us to patch the code than editing the actual file (and keep track of the patch at every update)?

Yes, you can create a Ticket_Overlay.pm overlay module in your local area (for example, /opt/rt4/local/lib/RT/Ticket_Overlay.pm, in a default RT installation - the debian/Ubuntu packaged version has these in a different place), and just override the particular function you want to change (SetQueue).  There's documentation on this in the Wiki.



 The Wellcome Trust Sanger Institute is operated by Genome Research 
 Limited, a charity registered in England with number 1021457 and a 
 company registered in England with number 2742969, whose registered 
 office is 215 Euston Road, London, NW1 2BE. 

More information about the rt-devel mailing list