It's all about the answers!

Ask a question

Problem in fetching HTTP link of change set


vikrant kamble (132558) | asked Dec 16 '15, 1:35 a.m.
edited Dec 17 '15, 6:39 a.m.
 Hi All,

1)
https://localhost:9443/ccm/web/projects/Demo#action=com.ibm.team.scm.viewChangeSet&contextItemId=_0rhM8JTFEeWVOr9wn9xrFQ&contextItemType=com.ibm.team.scm.Workspace&changeSetItemId=_LodVWqMVEeWku-gETe-qPw&fromHistory=1

This is change set link url, When I opened this from web UI, work items link section 
 
2)
https://localhost:9443/ccm/web/projects/Demo#action=com.ibm.team.scm.viewChangeSet&changeSetItemId=_LodVWqMVEeWku-gETe-qPw&fromHistory=1

This is url of same change set when I fetch it using
String uri = Location.itemLocation(cshandle, repoURL).toAbsoluteUri().toString();

Is there API to fetch change set url similar to first url.
In case of second url, problem as I mentioned in second comment is happening.
I had to restructure this question to make it more clear and easier to understand.

Comments
vikrant kamble commented Dec 16 '15, 1:39 a.m.

 This is not case for all change sets, some change sets links are fetched similar to change set link in Work item link section in web UI, and for some of change sets above condition arises. 


vikrant kamble commented Dec 16 '15, 3:48 a.m.

 Actually there is problem when we are fetching http link of change set using 

String uri = Location.itemLocation(cshandle, repoURL).toAbsoluteUri().toString(); 
this method.
If change set link is opened from webUI-->Work Item-->Links tab-->any change set link
In the window opened we can see at top left side
Source Control > Workspaces > Workspace name > component name >
But if I fetch http link using above method
Source Conrtol > unknown workspace > component name >
This is how it displayed.


vikrant kamble commented Dec 16 '15, 3:51 a.m.

 Also,

length of URL fetched from above method is shorter than length of URL when changed set is opened from web UI --> work item link tab and change set.

Be the first one to answer this question!


Register or to post your answer.