It's all about the answers!

Ask a question

Setting timestamp only on state transition but not on simple save

Lewis Tsao (2174760) | asked Jun 17 '13, 6:37 a.m. answered part of my question but not totally.

Let's say I have a WI and I want to record the last Closed date. So if I have a WI that is "In Progress" and I close it, then the last closed date is set. Now I go in and change the comment, then I don't want the last closed date to change. This was answered previously.

However, say I can reopen the WI, now when I close it again, I want the last closed date to change.

BTW, I do not want the last close date to change when I reopen the WI.

So to summarise:
I want a timestamp on a WI to change when a transition to a certain state occurs. I do not want the timestamp to change when I modify some other attribute when WI already in that state.
Once set, I do not want the timestamp to change unless there is a transition.

Accepted answer

permanent link
sam detweiler (12.5k6191201) | answered Jun 17 '13, 7:51 a.m.
edited Jun 17 '13, 7:51 a.m.
you could write an extension to do that. It will have to be a Java extension (follwup action), as the Javascript extensions cannot see the prior workitem state.

Lewis Tsao selected this answer as the correct answer

Lewis Tsao commented Jun 19 '13, 5:32 a.m.

any chance of "enhancing" the javascript extensions?
Searching through the forum, it appears that there have been a fair amount of interest in having this capability for all extensions.
This is already possible for "condition".
It would also be nice, for state transitions, if the old state is also available.

Your answer

Register or to post your answer.