It's all about the answers!

Ask a question

Two attributes with calculated value scripts with a dependency between them.


Fran Burgos (12312352) | asked Feb 29 '16, 9:52 a.m.
I have two attributes with calculated value scripts. The second attribute has a dependency with first attribute. But when the first script is triggered and it calculates value for first attribute then the second script is not trigger. How can I set the dependency between them for triggering events in cascade?

Accepted answer


permanent link
Dinesh Kumar B (4.1k413) | answered Feb 29 '16, 10:08 a.m.
JAZZ DEVELOPER
hi Fran,

atr_first <> depends on <> some_other_attribute
             <> applied with <> first script

atr_scnd <> depends on <> atr_first
               <> applied with <> second script

if this is case, I do not see anything more that is required for the second script to take effect and update the atr_scnd.

quick things i would review are
a.  ensure that the second script is indeed applied to atr_scnd
b.  second script reads the "right attribute id" from within, so as to understand the value change and return a different result
c.  perform a firebug trace, with a breakpoint inside the second script
or  a console.warn message from withing second script to know if its getting triggered or not

hope this helps

Regards,
Dinesh

Fran Burgos selected this answer as the correct answer

One other answer



permanent link
Donald Nong (14.5k614) | answered Feb 29 '16, 7:25 p.m.
There are no problems with cascading "change events" in JavaScript. Note the word "change" - if the first script sets a value same as the original to the first attribute, the second script will not be triggered, as there is no change. You should also verify that the second script can be executed by manually changing the value of the first attribute.

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.