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

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

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.

0 votes



One answer

Permanent link

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).

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
× 411

Question asked: Jan 31 '18, 8:24 a.m.

Question was seen: 1,989 times

Last updated: Jan 31 '18, 9:13 a.m.

Confirmation Cancel Confirm