Is it possible to check Related -> Type in Java API?
I am trying to build the following filter (Query building) using Plain Java API
Type: Defect AND Related (Link) -> Type is: Task AND Defect Status is UnResolved
I am able to do this in Web client. Just that I am not sure how to get the "Related" link's type using API
Edit: I need to build the below using Expressions in Plain Java API. Is this possible?
showing 5 of 6
show 1 more comments
|
One answer
Hello , I am not sure about the API type(Server side or client side.). I am providing you for client side API to get Related artifact. If you want server side as well let me know.
List<IReference> relatedRefs = workItemClient.resolveWorkItemReferences(
String stateName = WorkflowUtilities.findWorkflowInfo(
System.out.println("State Name "+stateName); } } Comments
Karthik Krishnan
commented May 15 '13, 3:13 a.m.
Thanks for this but I want to have this in the Filter condition of a query. I've edited my post with a screenshot. Please check that |
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.
Comments
Have you looked at this blog post from Ralph about working with the Work Item Linking API?
Yes, but I am looking for how to build "Related" Links in query filter using Plain Java API
anyone?
Is this possible at all using API's? Reason is I cannot achieve this using Eclipse client where as it's possible using web client
Hello Ralph Schoon
I would suggest - like Millard - to start with my blog. Start here: https://rsjazz.wordpress.com/2013/02/28/setting-up-rational-team-concert-for-api-development/
The blog contains articles about server and client link API's and also how to programmatic create and use queries, if you want that. If you can do it with the WebUI normal query mechanism you could do it using the API. See: http://rsjazz.wordpress.com/2012/10/29/using-work-item-queris-for-automation/
If the Eclipse and the Web UI behave differently, this is a defect you should report.
Dependant on what you want to do, you can do more with the API e.g. investigate the data in work items, look at links etc. See for example https://rsjazz.wordpress.com/2012/09/19/the-rtc-workitem-link-api-linking-workitems-to-other-elements/ or https://rsjazz.wordpress.com/2012/09/20/the-rtc-workitem-server-link-api-linking-to-work-items-and-other-elements/