Is there a way to find out the location of an SCM artifact when only having the UUID available?
Is there a way to find out the location of an SCM artefact (e.g. a file, baseline, snapshot etc.) when only having the UUID available e.g. when a link to a file is not valid anymore because it has been moved to a different project-area? An idea could be to implement a search which supports UUIDs as a search parameter… |
4 answers
Geoff, Philipp,
just to give a simpler example involving only one UUID, this would be how we can access (i.e. browse to the web-interface of) a snapshot, whose repository we know: https://<jazz_repositoryURL>/ccm/resource/itemOid/com.ibm.team.scm.BaselineSet/<SnapshotUUID> Comments
Geoffrey Clemm
commented Aug 28 '15, 11:25 p.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
Hi Dorian,
Dorian Daumiller
commented Aug 31 '15, 2:56 a.m.
Hi Geoff,
https://<jazz_repositoryurl>/ccm/resource/itemOid/com.ibm.team.build.BuildResult/<buildresultuuid>Single Change Set: https://<jazz_repositoryurl>/ccm/resource/itemOid/com.ibm.team.scm.ChangeSet/<changesetuuid>?Workspace=<WorkspaceForPathResolution>There doesn't seem to be a documentation of these things. Are they considered private interfaces? |
Geoffrey Clemm (30.1k●3●30●35)
| answered Aug 18 '15, 12:26 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
If by "location", you mean "a mechanism for accessing the object", then you can use the Java API to find any SCM object based on its UUID (different kinds of SCM objects are accessed by different APIs).
But if by "location", you mean a URL for an SCM object based on its UUID, probably the easiest way to determine such a URL is to open the WebUI, and browse around until you see a UUID-based URL for that kind of object. For example, if you browse for a directory in a workspace, you will see a URL like: https://clmwb.ibm.com:9443/ccm/web/projects/my-proj#action=com.ibm.team.scm.browseElement&workspaceItemId=_FBLbECAKEeWbgqBaDWsPHQ&componentItemId=_FB8QECAKEeWbgqBaDWsPHQ&itemType=com.ibm.team.scm.Folder&itemId=_1HZDACB5EeWhVMAQ6keEUA This is the URL for the version of the directory visible in the workspace _FBLbECAKEeWbgqBaDWsPHQ, the component _FB8QECAKEeWbgqBaDWsPHQ, and the item _1HZDACB5EeWhVMAQ6keEUA. This URL is valid, independent of the current pathname of that directory within that component. Note that the RTC URI's often introduce unnecessary segments. For example, the "project" segment is irrelevant (you could replace that project area name with any other project area name that you can access, and the URL would still work). Note that there are SCM objects that do not currently have a URL, such as a "component". Comments Hi Geoff,
Geoffrey Clemm
commented Aug 18 '15, 3:48 p.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
My answer above applies to both kinds of "artifacts" (i.e., there is always a Java API, and there sometimes is a URL that can be used in the WebUI). But first, we should clarify what you mean by "locate". Do you mean "read or manipulate that artifact in a script/program" or did you mean "allow a human to locate that object in a given UI"? (If the latter, then the answer will depend on which UI you are using ... Eclipse, VisualStudio, Web Browser, etc.)
Philipp Wohlgemuth
commented Aug 19 '15, 11:14 a.m.
OK, from what I have understood so far is that there is a possibility to use the Java API to get the location of a certain snapshot from its UUID (this is convenient for automating the use-case for reproducing a certain SW version. But if you'd like to reproduce the SW manually (in case the reprocucibility use-case occurs only once in while) then it is required to locate the object (i.e. for our specific use-case it would be a snapshot) in a given UI (preferably in Eclipse in order to be able to create a repository workspace out of it and load it on disc right away and build the SW which is going to be reproduced) but Web-UI would also be OK (if it tells you in which stream it is contained). So for the latter I would be grateful if you could give me some hints.
|
see the accepted answer here
https://jazz.net/forum/questions/94538/get-iversionablehandle-from-uuid it shows how to get the object handle from the UUID, and once u have the handle, you can get the object and all its reference info Comments
Geoffrey Clemm
commented Aug 31 '15, 7:48 p.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
I believe Philipp was looking for a way to manually create a URL from the UUID, rather than using API calls, but I agree it is still useful to cross-reference the API mechanism here, in case folks interested in the API mechanism run across this question.
|
Arne Bister (2.6k●1●28●32)
| answered Sep 01 '15, 12:09 a.m.
JAZZ DEVELOPER edited Sep 08 '15, 9:33 a.m.
Philipp,
to open a snapshot from the Eclipse UI when only knowing its UUID you need to prepend the UUID with the URI part given by Dorian (https://<serverName>:<port>/ccm/resource/itemOid/com.ibm.team.scm.BaselineSet/), then copy into clipboard, then navigate to Eclipse menu --> navigate --> Open Team Artifact from Clipboard: the snapshot object will open if the UUID is that of a snapshot and the prepended URI part is correct. Otherwise nothing will happen. - Arne |
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.
Comments
Hi Philipp,
Hi Arun,
imagine you have a link (URL) to a certain file inside SCM (e.g. provided in a work-item) and this has been moved (using a script) to a different project-area(PA), so it is not available anymore in the original PA. So from the link itself you do not get the name of the file and also not the name of the component/stream etc. you just have the UUID and some other cryptic strings which does not tell you at all what file it is and where it was located. So supposing the UUID did not change after the file has been moved to the new PA, how can I find out which file it is and where to find it in the new PA?
Thanks and regards,
Philipp
Hi all,
to get a better understanding of this: generally speaking, how do I find an artefact inside the system when I am only having the UUID available. One other use-case could be that a UUID of a snapshot is stamped into a hex-file (binary which is going to be flashed onto an ECU) for later reproducibility (in case of field problems). So now how do I find the snapshot which is referred by this UUID?
Thanks and regards,
Philipp