Jazz Forum Welcome to the Jazz Community Forum Connect and collaborate with IBM Engineering experts and users

Update parent work item depending on the values recieved from child work item and vice versa

Please look into below scenario
There are many work items(may be of same type or different type), for example there are 4 work items, their id's are 101, 102, 103 and 104. 101 work item is parent of all remaining work items.

1st use case
Depending on the values of attribute in parent I want to make some attributes in child work item as read only.
for example -
Parent work item's states are - Approved Round 1, Rejected Round 1, Approved Round 2, Rejected Round 2
Child work item's attribute are - Min 1, Max 1, Avg 1, Min 2, Max 2, Avg 2.
If parent work item is in Approved Round 1 state, Min 1, Max 1, Avg 1 attributes from each child work item should be read only. If parent work item is in Rejected Round 1 state, Min 1, Max 1, Avg 1 attributes from each of child work item will be in read only mode and Min 2, Max 2, Avg 2 attributes will be visible to users to fill values.

2nd use case
Along with above mentioned states one of the state of Parent work item is Get Round 1 Estimation Values. If parent work item is in this state I want to get values of Min 1, Max 1, Avg 1 attributes from each child work item and perform addition of values and set sum of values in respective parent work item attributes.

What could be the way to achieve these use cases in RTC. server version is 6.0.3 

0 votes


Accepted answer

Permanent link

You need to develop an extension.
https://jazz.net/forum/questions/79975/rtc-child-work-item-inheriting-attributes-from-parent
https://jazz.net/forum/questions/142545/auto-trigger-status-change-between-parent-child-work-items
https://jazz.net/forum/questions/82482/calculate-value-from-child-workitem-field-and-update-in-parent-workitem-field

vikrant kamble selected this answer as the correct answer

0 votes

Comments

 Hi Donald 

For second scenario i.e. I have to get values from child work item and update it to parent work item I believe I will have to develop extension.

But for first scenario is it not possible using customization capabilities of tool?

When you said "customization", I take that you meant "attribute customization", which is JavaScript based? If so, no, I don't think it provides capabilities of reading linked work items.

None of the use cases can be done with Attribute customization because the fundamental reason is that the JavaScript Attribute customization API which is published here https://jazz.net/wiki/bin/view/Main/AttributeCustomization has nothing available to find a linked work item (regardless of the link type) or to even access an attribute, or state, or anything, of another work item. It might be possible to find undocumented  ways in the Web UI, but I would not suggest trying. 


I think all the related links Don provided actually convey this as well.

Related posts (that have all been referenced in the links don provides


See the linked questions for more details.

In addition I would like to mention that there are currently 3 types of approvals. Approval, Review, Verification. There is no way that I would be aware of to store such information like first approval, second approval etc. in the work item other than using the approval subject, a special work item attribute, or (maybe) the order of the approval creation time. 


There is no way, I am aware of, to use this information in work item queries to report consistently to this information.

Any automation you would base on this would have to be carefully constructed e.g. preventing unwanted approval state changes in old entries or automatically setting work item attributes (approval round) or whatever solution you come up with. To create consistent working customization like this can become very complex.

Hi Ralph,

Here first approval, second approval are work item states, not the 3 types of approvals i.e Approval, Review, Verification which are provided by default. I am using these states of parent work item to make attributes in child work item read only. From above  explanation I believe to achieve this use case I will have to develop custom extension.
To achieve second use case i.e. calculate attribute values in child work item and update it to parent I was referring this link - https://rsjazz.wordpress.com/2012/07/31/rtc-update-parent-duration-estimation-and-effort-participant/

This link helped me getting what i want in second use case.

For first use case i will be using this link - https://rsjazz.wordpress.com/2015/06/19/a-custom-condition-to-make-attributes-required-or-read-only-by-role/

using these two links I believe i will be able to get solution.

I have not tried to get a linked work item in a Java based attribute customization which you create in https://rsjazz.wordpress.com/2015/06/19/a-custom-condition-to-make-attributes-required-or-read-only-by-role/ . If you manage to do it, would be nice if you share the code piece.  

showing 5 of 6 show 1 more comments

Your answer

Register or log in 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.

Search context
Follow this question

By Email: 

Once you sign in you will be able to subscribe for any updates here.

By RSS:

Answers
Answers and Comments
Question details
× 10,937
× 6,121

Question asked: May 10 '17, 4:53 p.m.

Question was seen: 4,093 times

Last updated: May 12 '17, 8:06 a.m.

Confirmation Cancel Confirm