It's all about the answers!

Ask a question

Can I define the order of attribute customization execution for RTC 3.0.1.1?


Andrew Trobec (49712144139) | asked Mar 25 '13, 5:47 a.m.
edited Mar 25 '13, 6:49 a.m. by Ralph Schoon (63.1k33646)
Hello

I have a number of scripted calculated value attribute customizations that are set to run when a work item is saved.  Is there a way of specifying the order in which the scripts are run?  If so, how?

I am using RTC 3.0.1.1.

Thank you and best regards,

Andrew

2 answers



permanent link
Ralph Schoon (63.1k33646) | answered Mar 25 '13, 6:56 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
 Hi,
as far as I am aware, the calculation is performed as soon as an attribute is changed that the calculated attribut selects as being dependent of. The order is determined by changes in the dependent attributes.

If you have a calculated value Attribute 3 being dependent on Attribute 1 and Attribute 2 the calculation is triggered if any one of the attributes changes. If you have a chain of dependent attributes, e.g. Attribute 4 being dependent on Attribute 3 the calculation should trigger once a dependent attribute is modified. In the case above, modifying Attribute 1 would trigger calculating Attribute 3 and that would trigger calculating Attribute 4.

You would basically have a chain of calculations if you have a chain of dependencies across several attributes.

Comments
Andrew Trobec commented Mar 25 '13, 7:03 a.m.

Hello Ralph,


Thank you for the quick reply.

In my case I have a number of attributes that are all dependent on the State, so when I save the work item they are all triggered.  I was wondering if this order can be defined.

Regards,

Andrew 


Ralph Schoon commented Mar 25 '13, 7:12 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER

Hi Andrew,

If they are all only depending on the state, the order should not matter, should it? As far as I am aware, there is no way to specify the order. It is calculated internally.


Robert Huet commented Jul 26 '16, 2:47 p.m.

Hi Ralph,

If you are using a hidden attribute to capture previous state so you know when there is a change in state, then the original calculated value (e.g. capturing last "Reopen" date) needs to fire before the "PreviousState" calculation, right?  I'm confused, because I've read posts recommending a PreviousState attribute so that the script can know if there is a state change, but then I'm seeing here that you can't control the order that the calculation scripts execute.  So how can this strategy work?
Thanks,
Robert


permanent link
Robert Huet (23112884) | answered Jul 27 '16, 11:52 a.m.
edited Jul 27 '16, 11:53 a.m.
 With RTC 5.0.2, I have been able to control the order of execution through the naming of my attribute ID's.  RTC seems to fire off the calculated value scripts based on the ordering of the the corresponding attribute IDs.  Thank you to Lily Wang for tipping me off to this!

So if I have a calculated attribute that needs to be calculated last, I use the following convention when naming my attribute ID:  com.myorg.workitem.attribute.zzzMyAttribute

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.