It's all about the answers!

Ask a question

Updation of the date field based on the WI state change.


Savitha palya (2652) | asked Jan 28 '10, 7:46 a.m.
edited Mar 14 '13, 7:54 a.m. by Ralph Schoon (63.3k33646)
Please let me know how to update the date field - start date based on the state change of the workitem. As and when the developers change the workitem state from Open to Inprogress, then automatically the start date should be assigned with the date and time. I see the history tab which
provides the preview of the complete workitem changes, in which we also see the state change and the date and time.

Could some one provide me the program to achive the same?

Accepted answer


permanent link
Ralph Schoon (63.3k33646) | answered Mar 14 '13, 7:54 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
edited Mar 14 '13, 7:55 a.m.
Hi, with 3.x and 4.x you could achieve this using workitem customization. If you create a Java Script based calculated value for that attribute (if it is an attribute that can be set and not only internal to planning). The restriction is that the calculated value provider can only have a dependency to the state, so that only the state change triggers it. See https://jazz.net/library/article/1093 Lab 5 for more examples.

Another option in earlier releases would be - again assuming this is a real attribute of the work item that is stored as any other work item attribute, to create a Java based server participant that detects the state change/action and sets the attribute. See https://jazz.net/library/article/1000 as a starting point.
Ralph Schoon selected this answer as the correct answer

Comments
Ralph Schoon commented Aug 11 '16, 2:15 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER

Note that detecting a state change is very hard in attribute customization. It is necessary to store the current state in an attribute. The calculation can also be triggered multiple times which you have to narrow down to one.

Your answer


Register or to post your answer.


Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.