[rt-devel] Incorrect setting of Time Resolved with multiple inactive states?
Davide Imbeni
davide at nabla2.it
Wed Apr 3 05:30:35 EDT 2013
Thanks Tim.
I missed the Overlay method, very useful.
I think the actual function to overlay should be SetStatus (for now I'll disregard status changes that are set together with Queue changes or at creation), but I think I get it.
Thanks again
Davide
--- Davide Imbeni, Nabla2 s.r.l.
--- Viale Monchio 116, 41124 Modena (MO) - Italy
--- Email: davide at nabla2.it
On 03/apr/2013, at 10:47, Tim Cutts <tjrc at sanger.ac.uk> wrote:
>> --- 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.
>
> Regards,
>
> Tim
>
> --
> 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