JAVA API to read/write work item query from/to server.
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
The only API I have tried is explained in https://rsjazz.wordpress.com/2012/10/29/using-work-item-queris-for-automation/ and https://rsjazz.wordpress.com/2012/11/19/using-expressions-for-automation/ . On Jazz.net the following wiki shows more information: https://jazz.net/wiki/bin/view/Main/QueryDevGuide .