Re: [rt-users] 'Started' not being set when ticket status changes from 'New' -> 'xxx'

2015-09-12 Thread Alex Vandiver
On Sat, 12 Sep 2015 13:37:51 -0700 Alex Vandiver  wrote:
> On Fri, 11 Sep 2015 14:55:47 -0500 "k...@rice.edu" 
> wrote:
> > Just to follow-up. I made a global scrip to set the 'Started' date
> > field when it is un-set and the transaction is a status change from
> > 'new' to either 'open' or 'resolved'. I thought that this was
> > handled by RT internally when the status changed from 'new' but I
> > could not find any place in the code that handled it.
> 
> This was in core code in RT 4.0, but was moved to a global scrip in RT
> 4.2: [snip]

Sorry, I mis-read your question; the scrip in question is for the
opposite (opening the ticket if Started is set).  The code that sets
Started when a ticket is moved to a non-initial state is:

https://github.com/bestpractical/rt/blob/stable/lib/RT/Ticket.pm#L2393-L2403

The only thing that could be causing that to not fire is if you have a
custom lifecycle with all-Initial statuses.
 - Alex


Re: [rt-users] 'Started' not being set when ticket status changes from 'New' -> 'xxx'

2015-09-12 Thread Alex Vandiver
On Fri, 11 Sep 2015 14:55:47 -0500 "k...@rice.edu"  wrote:
> Just to follow-up. I made a global scrip to set the 'Started' date
> field when it is un-set and the transaction is a status change from
> 'new' to either 'open' or 'resolved'. I thought that this was handled
> by RT internally when the status changed from 'new' but I could not
> find any place in the code that handled it.

This was in core code in RT 4.0, but was moved to a global scrip in RT
4.2:

https://bestpractical.com/docs/rt/4.2/UPGRADING-4.2.html (search for
Started)

If this was an RT instance that was upgraded from 4.0, the lack of this
behavior my imply that not all upgrade steps were run.
 - Alex