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

Changeset Copy URL - Inconsistent Behaviour in Eclipse

https://****.com/ccm/resource/itemOid/com.ibm.team.scm.ChangeSet/_HoD3oGtrEeapQo-7PRo5ZA?Workspace=_ODiiwGtqEeapQo-7PRo5ZA

when this URL is opened in the browser is works fine.

When it is provided to the Class URI
String url =https://
*.com/ccm/resource/itemOid/com.ibm.team.scm.ChangeSet/_HoD3oGtrEeapQo-7PRo5ZA?Workspace=_ODiiwGtqEeapQo-7PRo5ZA
 URI uri = URI.create(url);
StandardContextProvider contextProvider = new StandardContextProvider(null);
 Hyperlinks.open(uri, contextProvider);
when it opens in Eclipse Change Summary view - shows in the Unresolved State


This behaviour is inconsistent for same url in Eclipse and browser - why is it so?
It is also observed that in eclipse for some URL's it works fine and some not- being inconsistent.

Use Case:
when user provides Copy URL  (https://local-
****.com/ccm/resource/itemOid/com.ibm.team.scm.ChangeSet/_PbLN4Ni0Eea389w0btYOGQ?Workspace=_nh1m4I-tEeaLsakBEbSk3Q) as input

in the back ground code uses API's
URI uri = URI.create(url);
StandardContextProvider contextProvider = new StandardContextProvider(null);
 Hyperlinks.open(uri, contextProvider);

0 votes



One answer

Permanent link
The Change Summary code was not written to parse out the workspace part of the URL. Internally, the URL handler just pulls out the change set ID, and tells the Change Summary view to open that change set.

The Change Summary view has it's own logic on how to compute the context to use... I think it will check if you have any workspaces/streams loaded/tracked in the Pending Changes view (that contains the component of the change set), and it will use that context. It's possible if nothing is loaded in the Pending Changes view, then the Change Summary view will not have a context (or it could have the wrong one). The good news is that there is a button on the Change Summary view toolbar called "Select location to resolve paths" which can be used (in the odd chance the context picked does not have all the parent paths). This feature (ability to change contexts) is not available in the web UI unfortunately. Keep in mind, the way it works in the Eclipse client makes sense for the majority of use cases (most normal work flows do not have URLs opened up in the Eclipse client.).

Feel free to open an enhancement request to see if the context could be stripped out of the change set URL and used instead of a workspace loaded in the Pending Changes view.

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,937
× 7,495
× 1,700

Question asked: May 02 '17, 10:18 a.m.

Question was seen: 3,150 times

Last updated: Jun 20 '19, 1:49 p.m.

Related questions
Confirmation Cancel Confirm