It's all about the answers!

Ask a question

How to calculate a value on state change?


Franca Zober (1512) | asked Jan 15 '20, 2:14 a.m.

 Hi all,


I would like to change some specific attributes based on a state change. 

My problem is that while I can change attributes based on the change of other attributes through calculated values and cannot figure out how to make it dependent on the state change. If I write a script and link it the attribute to be changed and set status attribute as dependencies it doesn't work. Obviously as long as I haven't saved the item, the state hasn't changed.

Anyone with hints how I can achieve what I am looking for?

Thanks - franca

One answer



permanent link
Ralph Schoon (63.1k33646) | answered Jan 15 '20, 2:57 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
This has been asked and answered multiple times over the years.
You can not really detect the state change in attribute customization, except you can detect the selected action in conditions.

I know that users have tried to store the state in hidden attributes and used that to detect state changes. I consider that not a great solution. An advisor or follow up action (Java Extension) might be needed here.


Comments
Franca Zober commented Jan 15 '20, 3:13 a.m.

Thanks! 


Java Extension isn't a road for me to follow unfortunately. But for your comment on "detect the selected action" - what field is the selection action stored at/ how to a see that in the script?


Ralph Schoon commented Jan 15 '20, 3:25 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
Read my answer carefully you can detect that only in conditions.

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.