It's all about the answers!

Ask a question

How to fetch related asset data from any asset?


soumen sardar (323) | asked Aug 08 '14, 5:21 a.m.
edited Aug 08 '14, 5:32 a.m. by Ralph Schoon (63.1k33646)
Hi,

I am trying to fetch asset with BPH Level category from RAM programmatically. When i am getting BPHL1 asset, i want to fetch liked BPHL2 asset. How do i get that?

I am able find proper api for that.

Can anyone please help on this...Thanks

regards,
Soumen

Comments
Lin Lu commented Aug 18 '14, 1:08 a.m.
JAZZ DEVELOPER

Hi,

From post summary I think you need to fetch a related asset of current asset. However after read your description, I think it is about category schema. I am kind of confused here.

So, Is the assets categorized under two categorization? or there is a relationship between these two assets? It will be helpful if there is more details about the scenario.

Thanks.

Accepted answer


permanent link
Lin Lu (3063) | answered Aug 18 '14, 2:53 a.m.
JAZZ DEVELOPER
Hi,

Thanks for update.

I think one fetch related assets in following way:

1. for current RAMAsset object, call RAMAsset#getRelationships to retrieve relationships current asset has;
2. for one RMARelationship,  call RAMRelationship#getChildAsset() to retrieve related asset, use RAMRelationship#getRelationshipTypeName() to fetch relationship name.
 

Hope that could help.
soumen sardar selected this answer as the correct answer

Comments
soumen sardar commented Aug 26 '14, 2:52 a.m.

Thanks Lin... 

One other answer



permanent link
soumen sardar (323) | answered Aug 18 '14, 2:30 a.m.
 I am trying only to fetch related assets from current asset. Still I am facing problem to do that.

Any help will be greatly appreciated. 

Thanks

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.