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

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.

0 votes



One answer

Permanent link

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 .

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: Apr 28 '17, 2:29 a.m.

Question was seen: 2,796 times

Last updated: Apr 28 '17, 2:43 a.m.

Confirmation Cancel Confirm