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

How to create query using IQueryDescriptorWorkingCopyManager

How to create query using IQueryDescriptorWorkingCopyManager?

I use one exist query and modify the expression, but seems queryDes.setExpression(expression) does not work.
Anyone can help?

ItemQueryIterator<IQueryDescriptorHandle> iterator=
WorkItemQueries.queryDescriptorByName(auditableClient, projectArea, "all work items");
IQueryDescriptorHandle queryhandle= iterator.next(null);
IQueryableAttribute similarityAttribute= findAttribute(projectArea, auditableClient, IWorkItem.SUMMARY_PROPERTY, null);

IQueryDescriptorWorkingCopyManager queryWorkingCopyManager = queryClient.getWorkingCopyManager();
queryClient.getWorkingCopyManager().connect(queryhandle, null); QueryDescriptorWorkingCopy querywc = (QueryDescriptorWorkingCopy) queryWorkingCopyManager.getWorkingCopy(queryhandle);
QueryDescriptor queryDes = (QueryDescriptor) querywc.getQueryDescriptor();
AttributeExpression expression= new AttributeExpression(similarityAttribute, AttributeOperation.EQUALS, "aa");
queryDes.setExpression(expression);

0 votes



One answer

Permanent link
You might want to look here:

https://jazz.net/forums/viewtopic.php?p=57252
https://jazz.net/wiki/pub/Main/QueryDevGuide/DupeFinder.java

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

Question asked: Jan 04 '12, 7:02 a.m.

Question was seen: 4,765 times

Last updated: Jan 04 '12, 7:02 a.m.

Confirmation Cancel Confirm