It's all about the answers!

Ask a question

Java Client API get a query by it's web ID


sara chason (27224) | asked Jan 31 '18, 8:24 a.m.

Hi,

I see that queries in RTC have a web ID showing in their link:
<project URI>/web/projects/<project name>#action=com.ibm.team.workitem.runSavedQuery&id=_YYkhcADzEeiYTtmwfgbVzg
Is there a way to use Java Client API to retrieve a query by the above ID?
All I'v seen so far is how to retrieve a query by its name:
if (iQueryDescriptor.getName().equals(queryName)) {...}
Is there another function I can use to retrieve the query's web ID?

Thanks in advance,
Sara.

One answer



permanent link
Ralph Schoon (63.6k33646) | answered Jan 31 '18, 9:13 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER

I would assume that the ID you mention is basically the ID of the query descriptor: com.ibm.team.workitem.common.query.IQueryDescriptor.getId()

I think you should be able to get the Id as shown above and compare it. Or you can try to use a query model (see https://rsjazz.wordpress.com/2017/02/14/query-models-or-how-to-find-stuff-with-the-rtc-api/ ) and search for the ID if you have it using the query model, com.ibm.team.workitem.common.internal.query.query.BaseQueryDescriptorQueryModel.id() (note it is internal).

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.