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

How to get conflict report API

Hello,

I need some help to get information about workspace conflict:

1) List of files with conflict

2) Creators (2) of the conflict

3) the related Work-items of the conflict change-sets

My code (client side):

//get conflicts report

Collection<IItemConflictReport> ConflictReport2 = myNewWKSP.conflictReport().conflicts();

for( IItemConflictReport SingleConflict : ConflictReport2){

System.out.println(SingleConflict.getMergeDetails().toArray().toString());

}

Thanks.

0 votes

Comments

Hi,

How can I get a list of conflict files ?

Thanks.


Accepted answer

Permanent link
The conflicts() call returns the items that are conflicted. If you want the names of the files, you'll have to resolve them. You can use myNewWKSP.configuration(IComponentHandle) to get a configuration where you can determine the path of the file.

To find the users, I guess you want to find the owners of the change sets that are in conflict. You'll have to use the states that you get from the IItemConflictReport to find the change sets that have those states and retrieve the change set owner.

For the links, you'll need the ILinkService to fetch the links on the change set. You can go through the links and see which ones are work items then get whatever info you need from them. You could also try using the ChangeSetLinks utility class if you can access it. You'll need a provider factory for it, which you can get like this:
ProviderFactory providerFactory = (ProviderFactory) myNewWKSP.teamRepository().getClientLibrary(ProviderFactory.class);	
	
	
Yehiel Glass selected this answer as the correct answer

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,936
× 1,202

Question asked: May 09 '13, 11:51 a.m.

Question was seen: 4,018 times

Last updated: Jul 15 '13, 11:55 a.m.

Confirmation Cancel Confirm