Capturing Iteration end and start date using Java Script
I have a requirement to change the state of an attribute depending upon the iteration time stamps. Can you please suggest some way through Java script to capture the time stamps of Iteration / Timelines. I have gone through few docs and realize that working with Iteration involves capturing of UUID which I am able to do but how to proceed further with this ?
One answer
I think you will struggle to obtain this value via Javascript. Iteration / Timelines are not included in the list of items supported in "Accessing built-in attributes of the work item". You may be banging your head against a wall on this.
https://jazz.net/wiki/bin/view/Main/AttributeCustomization
If you really want to do this, I suggest creating a Java based attribute customization provider, as explained in this blog.
I did this recently. Although it is a lot more involved in terms of set up, you have a lot more flexibility.
https://rsjazz.wordpress.com/2013/06/26/attribute-customization-java-based-value-providers-conditions-and-validators/
Look at this section at the bottom of the Javascript attribute customization wiki page for deployment information:
"Creating a plug-in that contributes an attribute customization".
Comments
In general, as Ian correctly states, the JavaScript attribute customization API does not provide any access to that kind of information. It is possible to use HTTP communication to potentially get access to such information.
Please note that I have seen an example recently where a customization rendered the RTC Web UI impossible to use due to excessive communication of JavaScript with the server..
The DACH Jazz Community has done some miracles. See https://rsjazz.wordpress.com/2017/08/21/status-history-presentation-for-rtc/ with examples. This might inspire,I don't know.
I would, if this is absolutely necessary, probably look at a Java based attribute customization or a follow up action (Java).
Also see https://rsjazz.wordpress.com/2016/07/15/rtc-process-customization-what-you-can-and-cannot-do/ for some hints on limitations of approaches.