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

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?

0 votes



2 answers

Permanent link

There are several dependent on the context.

0 votes

Comments

I need to access children of a work item in a custom attribute script in the EWM Client and check the type of it.

So why do you not provide this minimal amount of information in your original question?

That, as far as I know, is not supported in the public attribute customization JavaScript API. It has been asked many times now.
This is the "official" API description: https://jazz.net/wiki/bin/view/Main/AttributeCustomization
Note, it does not mention links, neither complex items.

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. 


Permanent link
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

0 votes

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,938
× 7,495
× 1,325

Question asked: Jul 17, 9:27 a.m.

Question was seen: 545 times

Last updated: Jul 18, 6:10 p.m.

Confirmation Cancel Confirm