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

Copy the personal queries from a contributor by API

Hello,
How could I copy the personal queries from a contributor to another by API?
I have obtained the list of contributor's queries (list of IQueryDescriptor), but I dont know how to change the associated contributor in the IQueryDescriptor.
This is the code to obtain de list of IQueryDescriptor:

IQueryClient serviceQuery = (IQueryClient)repo.getClientLibrary(IQueryClient.class);
List <IQueryDescriptor> listQueries = serviceQuery(findPersonalQueries(areaAux.getProjectArea() , contAux, null, IQueryDescriptor.FULL_PROFILE, new NullProgressMonitor());

Thank you very much
Best Regards

0 votes



One answer

Permanent link
How could I copy the personal queries from a contributor to another by
API?
I have obtained the list of contributor's queries (list of
IQueryDescriptor), but I dont know how to change the associated
contributor in the IQueryDescriptor.
This is the code to obtain de list of IQueryDescriptor:

IQueryClient serviceQuery =
(IQueryClient)repo.getClientLibrary(IQueryClient.class);
List<IQueryDescriptor> listQueries =
serviceQuery(findPersonalQueries(areaAux.getProjectArea() , contAux,
null, IQueryDescriptor.FULL_PROFILE, new NullProgressMonitor());

You can use
com.ibm.team.workitem.client.query.IQueryDescriptorWorkingCopyManager to
get a working copy of the query, change the owner and save the query.

Changing the owner:

com.ibm.team.workitem.common.internal.query.QueryDescriptor.setCreator(IContributorHandle)

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

Question asked: Jun 09 '10, 6:23 a.m.

Question was seen: 5,403 times

Last updated: Jun 09 '10, 6:23 a.m.

Confirmation Cancel Confirm