It's all about the answers!

Ask a question

RTC: child work item inheriting attributes from parent


Luca Martinucci (1.0k397112) | asked Jun 22 '12, 10:20 a.m.
I have defined a parent-child relationship between 2 work item types.
I want the child work item to inherit some attributes from the parent when it is created.
So, for example, if the parent has attribute X with value Y, the child should have attribute X (I defined attributes with the same names) with value Y.
Can this be done via .js scripts (as a calculated value), or is a Java extension required?
Has anybody a sample code to share?
RTC version is 3.0.1.2

Accepted answer


permanent link
Ralph Schoon (63.3k33646) | answered Jun 25 '12, 9:14 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
Hi Luca,

as far as I can tell the javascript API does not allow you to traverse links. See my answer on a similar question from you: https://jazz.net/forum/questions/78907/validator-for-work-item-type-in-parent-child-attribute

You could do it with an extension, the post above shows resources you should look at.
Here a post that shows the part of the API that allows to get related work items: https://jazz.net/forum/questions/30423/changing-state-of-stored-quotrelatedquot-work-items-pr
Luca Martinucci selected this answer as the correct answer

Comments
Ralph Schoon commented Sep 25 '12, 6:25 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER

Bob 3 commented Oct 12 '17, 12:41 a.m. | edited Oct 15 '17, 1:33 p.m.

I wanted to see if there was any updated information for this subject as of RTC 6.0.4? I have a need to inherit some attribute values from a parent work item.


Ralph Schoon commented Oct 12 '17, 2:42 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER

No and it is pretty unlikely that there will ever be a built in functionality. There are no plans, there is no real common requirement.  


Ralph Schoon commented Oct 12 '17, 2:43 a.m. | edited Oct 12 '17, 2:45 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER

Luca Martinucci commented Oct 16 '17, 5:23 a.m.

This post was from some years ago.

Now, I have done such an automation several times, not only for parent-child, but for several kinds of links.
Anyway, developing a custom Java extension is still the only solution.

One other answer



permanent link
Deepa M S (71) | answered Sep 06 '22, 6:27 a.m.

 Hi Ralph,


 I use the option "Create Child Workitem" to create a child workitem from a Parent workitem. When i do this, some fileds like "Filed Agianst", "Project Area"  ..etc value gets copied to Child workitem. Similarly I would like to have few more attributes to be copied to child workitem. Is this possible?
 

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.