It's all about the answers!

Ask a question

JAVA API to read/write work item query from/to server.


praveen hanchinamani (2729) | asked Apr 28 '17, 2:29 a.m.
edited Apr 28 '17, 2:38 a.m. by Ralph Schoon (63.1k33645)

 Dear all,


I am trying to read out the work item queries created in ALM server( particular to query name, description and conditions mentioned in the query).

As far now, i am able to fetch the IQueryDescriptior & Expression from this query descriptor; from the code snippet shown below - 

IWorkItemClient workItemClient = (IWorkItemClient) teamRepositoryInstance.getClientLibrary(IWorkItemClient.class);
IQueryClient queryClient = workItemClient.getQueryClient();

List queries = queryClient.findPersonalQueries(projectArea.getProjectArea(), loggedInContributor,                   
                      QueryTypes.WORK_ITEM_QUERY,
                      IQueryDescriptor.FULL_PROFILE, 
                      new NullProgressMonitor());

for (Iterator iterator = queries.iterator(); iterator.hasNext();) {
      IQueryDescriptor iQueryDescriptor = (IQueryDescriptor) iterator.next();

      Expression conditions = iQueryDescriptor.getExpression();
}


After this, how can i proceed to get the desired values with proper structure of conditions mentioned in the query?

it would be great if some hint/code snippet is available.

And are there any REST calls to achieve the same?

Thank you.

One answer



permanent link
Ralph Schoon (63.1k33645) | answered Apr 28 '17, 2:43 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER

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.