It's all about the answers!

Ask a question

How to resolve tracks change references ?


Rinkal Garg (1729) | asked Mar 29 '18, 3:56 a.m.
edited Apr 02 '18, 5:11 a.m.

 I have some links with link type id - com.ibm.team.workitem.linktype.scm.tracksChanges and want to fetch the data. Please help. Below is the code I am using :

IChangeSetHandle changeSetHandle = (IChangeSetHandle) link.getTargetRef().resolve();
wiHandles.add((IChangeSetHandle) link.getTargetRef().resolve());
if (source instanceof IChangeSetHandle) {
changeSet = (IChangeSet) repo.itemManager().fetchCompleteItem(changeSetHandle,
IItemManager.DEFAULT, monitor);
System.out.println("changeset---1"+changeSet);
}


Comments
Piotr Aniola commented Mar 30 '18, 10:11 a.m. | edited Mar 30 '18, 10:12 a.m.

 It would be easier to help you if you shared some details: what API are you using - java API? REST? OSLC? What data exactly do you want to fetch? 


Rinkal Garg commented Apr 02 '18, 5:10 a.m.

 I am using java client side API and want to fetch the change set data like change set owner, change set creation time or file name which is added or modified. I have some work item links of id - com.ibm.team.workitem.linktype.scm.tracksChanges which has the URI for all those information. The only challenge I am facing is - I am not able to find the data using any java API code.


Rinkal Garg commented Apr 03 '18, 8:18 a.m.

I am getting the below issue while fetching the change set data :  com.ibm.team.repository.common.ItemNotFoundException: CRJAZ0215E The following record was not found in the database: com.ibm.team.scm.common.internal.impl.ChangeSetHandleImpl


Ralph Schoon commented Apr 03 '18, 11:05 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER

I provided code on a similar question. I provided links where you should be able to look at example code for the link APIs. Links how to set up the environment to search for examples in the SDK.

I don't think anyone can really help. It is impossible to remote debug. I don't have the impression you take answers into consideration. Last but not least the questions are always so bare bones that any answer is guessing.

Piotr also asks for better details.... I gave up on it already.

You keep posting insufficient questions and you create multiple for the same stuff. As a moderator I should consider closing the duplicate questions.

I have seen this before and unless you get a lot better in asking, this is not going anywhere.


Ralph Schoon commented Apr 03 '18, 11:23 a.m. | edited Apr 03 '18, 11:27 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER

A last thought. When I develop and debug this stuff, I tend to write code that is longer and provides more hooks where to stop and look at stuff while debugging. Often even print lines. Or instanceof tests and then casts to a different class/interface in two lines to be able to step and find cast issues.

The line wiHandles..... is odd as it does look like you are adding change set handles.
Like in so many other of you questions for code I see the same stuff multiple times for example



(IChangeSetHandle) link.getTargetRef().resolve();

This gives me the feeling the code is chaotic and it is impossible to help as the code is not understandable and the author does not understand what they are doing and getting..

Be the first one to answer this question!


Register or 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.