Access Children of Work Item
I need to access the Children of a Work Item and verify that the types are the same. Is there a way I can do this? |
2 answers
Ralph Schoon (63.6k●3●36●46)
| answered Jul 18, 2:05 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER There are several dependent on the context. Comments
Delaney Glassford
commented Jul 18, 8:17 a.m.
I need to access children of a work item in a custom attribute script in the EWM Client and check the type of it.
Ralph Schoon
commented Jul 18, 8:24 a.m.
| edited Jul 18, 8:25 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
So why do you not provide this minimal amount of information in your original question?
My experience over the years: https://rsjazz.wordpress.com/2022/11/25/ewm-attribute-customization-introduction/
If you carefully search, you will find things like this: https://jazz.net/forum/questions/274622/get-links-related-in-javascript-in-eclipse-for-rtc-web This is unsupported, internal API and it will only work in the Web UI. |
As Ralph said, this is an internal API and so is subject to change but you can use this:
const childItems = workItem.getProxy().getValue({ path : [ 'linkTypes', 'com.ibm.team.workitem.linktype.parentworkitem' ]} );
This will return an array of Objects that are link types, from which you'll be able to get some information. I can't remember if the Work Item type is in this but you should be able to use the info to get it
|
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.