How can i retrieve the new state value of WI with script based values?
2 answers
this is as designed. Please see https://jazz.net/wiki/bin/view/Main/AttributeCustomization and https://jazz.net/library/article/1093 Lab 5 for more information. Scrips only get triggered when attributes change. You can also only have a dependency to the state attribute today if you want to know the stat changed, If you need to do something more elaborate, you need to create an advisor. Start here if you want to go that route.
Comments
Hi Ralph,
Hi Fausto,
that is an interesting observation. I think what you do when selecting the new state is basically selecting the action. The Java API is designed in a way that you save the work item and provide the action as well. So the state change does actually happen after the save. This is reflected by the case that the new state is available only after saving. I think it would be desirable to have access to the state change as well. You might want to open an enhancement request.
1 vote
I looked into the API used for attribute customization for http://rsjazz.wordpress.com/2013/06/26/attribute-customization-java-based-value-providers-conditions-and-validators/, I am not even sure the state change can be detected with the available API.
Hi, Ralph,
Comments
The Java API has pretty much the same input data the JavaScript has. From the input only conditions get the action that allows to calculate the target state.
So for all other provider this is a no. I am not sure if you could use the Java API to get more information, especially since I only very recently learned that the Java provider can get called in a different way (on save and not on change in a dependent attribute).
Thanks, Ralph, looking foward to your blog about "the Java provider can get called in a different way"!