It's all about the answers!

Ask a question

Assign date Systematically based on State change


Amit Girme (1131724) | asked Feb 06 '13, 5:01 a.m.
edited Apr 02 '13, 4:33 a.m. by Ralph Schoon (56.6k23642)
 Hi All,

I have created attribute  'Start Date' in Work item, That attribute is empty and read only in initial state of Work item.

Now the moment owner changes state of work item from 'new' to 'In progress', Start Date should take System Date automatically.

How is it possible to do? I tried with Calculated values but it didn't worked for me.

Thanks in Advance!

One answer



permanent link
Ralph Schoon (56.6k23642) | answered Feb 06 '13, 6:03 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
The best way to address this is to write a so called Participant - a server side extension of a followup action.
You can find an example and training in the Extensions workshop here: https://jazz.net/library/article/1000

Please note you have to run the workshop on 4.0. It does not run on 4.0.1. There is also the same workshop for older versions in the library.

The code in the workshop detects a state change and shows how to act on it. You can find more examples around the APIs in my Blog: http://rsjazz.wordpress.com/ . Please note, you should not use an Advisor (pre condition) for the reasons described in this post: http://rsjazz.wordpress.com/2012/12/14/do-not-modify-the-triggering-element-in-an-operationadvisor/
 

Comments
Ralph Schoon commented Apr 02 '13, 4:37 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER

You could potentially use JavaScript based attribute-customization as described here https://jazz.net/wiki/bin/view/Main/AttributeCustomization the issue as discussed in this forum is that a calculated value based on the state of the work item can only trigger on the state attribute. Otherwise it would be impossible to determine if a state change happened. See https://jazz.net/library/article/1093 for more information.

I would still prefer a participant.

Your answer


Register or to post your answer.