RTC: child work item inheriting attributes from parent
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
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
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
Comments
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.
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.
It is possible to create custom extensions. See
For some examples.
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
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?