It's all about the answers!

Ask a question

Changeset Copy URL - Inconsistent Behaviour in Eclipse


vijayakumar ramesh (1173660) | asked May 02 '17, 10:18 a.m.

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);

One answer



permanent link
David Lafreniere (4.8k7) | answered Jun 20 '19, 1:49 p.m.
FORUM MODERATOR / JAZZ DEVELOPER
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.

Your answer


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.