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

How to get a list of queries defined in RTC?

Hi,

How can I get a list of queries (both predefined and custom queries) defined in RTC using the client api?

Any help is appreciated. Thanks alot!

0 votes



3 answers

Permanent link
To be more specific, I'm looking for a list of queries that query work items.

Thanks.

Hi,

How can I get a list of queries (both predefined and custom queries) defined in RTC using the client api?

Any help is appreciated. Thanks alot!

0 votes


Permanent link
I'm able to get a list of queries by using QueryDescriptorQueryModel. But now I have another question.

How can I get an IItemQuery object from the IQueryDescripter object?

What I'm trying to do is I have the name (String type) of the query that I want to execute. I assume that I will need to get its query object for the query execution (to get work items). How can I get the query object by the name string?

I can get the IQueryDescripter by name. But what should I do next in order to execute that query?

Please help! Thank you very much.



To be more specific, I'm looking for a list of queries that query work items.

Thanks.

Hi,

How can I get a list of queries (both predefined and custom queries) defined in RTC using the client api?

Any help is appreciated. Thanks alot!

0 votes


Permanent link
What I'm trying to do is I have the name (String type) of the query
that I want to execute. I assume that I will need to get its query
object for the query execution (to get work items). How can I get the
query object by the name string?

I can get the IQueryDescripter by name. But what should I do next in
order to execute that query?

We currently don't have public API to retrieve a query by name, but you
could do the following:

IAuditableClient auditableClient=...
IQueryClient queryClient=...
ItemQueryIterator<IQueryDescriptorHandle> iterator=
WorkItemQueries.queryDescriptorByName(auditableClient, projectArea, name);
IQueryDescriptorHandle handle= iterator.next(monitor);
IQueryDescriptor query= auditableClient.resolveAuditable(handle,
IQueryDescriptor.FULL_PROFILE, monitor);
results= queryClient.getResolvedQueryResults(query,
IWorkItem.SMALL_PROFILE);

--
Regards,
Patrick
Jazz Work Item Team

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,937

Question asked: Mar 03 '09, 8:27 p.m.

Question was seen: 7,436 times

Last updated: Mar 03 '09, 8:27 p.m.

Confirmation Cancel Confirm