Finding what type of Item a UUID represents
Is there a way to find the type of ITEM (Baseline, workspace, snapshot...) a UUID represents?
|
10 answers
Well, there isn't any official API for this, but you can do:
- copy the UUID - paste it into a URL of the form: <your_repo>/resource/itemOid/com.ibm.team.scm.Component/_DC6QYM0yEd2CTNaxDdYRfg?_mediaType=text/xml (replacing the UUID there with yours) - open this in a web browser - there the XML should indicate the type For example, in this case the item in our self-hosting repository is a workspace, so the XML is:
Here, the XML namespace is the id for the component (com.ibm.team.scm) defining the item type (Workspace). |
Sorry I need to be able to do this using the Java API, is it possible.
|
You could try just creating a handle of a given type with the UUID, fetching it, then seeing what the actual type is.
e.g. IItemHandle handle = IComponent.ITEM_TYPE.createHandle(uuid, null); |
Just curious: why do you need to do this? Normally the UUID should be paired with its item type.
|
Since name are not unique in rtc we are storing UUID, it would be nice to know what a UUID represents when we have problems.
|
In RTC itself, when we store a reference to another item, we store an item handle, which is: item type + item UUID .
I suggest you store the item type too, not just the UUID. |
We have problem where the end user will be presented with an error message and part of the message is "... Type=WorkItem, Itemid=(UUID...and then the value). But it doesn't tell us which field in the Work item it pertains to. It doesn't always occur. But it would be nice if we could instruct the person what to do in order to see which field is the problem.
We just do basic configuration of a Work Items - so we are not doing anything special that includes overt creation / association of UUIDs. Does this point to something wrong in RTC 3.0.1 ? (not the fact that we get an error, but the fact that we do see the name of the field that is in error). |
Please file a work item against the Work Items team for this issue, including what steps lead to that error. At minimum, it's a pretty poor error message, and we're doing a pass to improve error messages in general in 4.0 M8 (our next milestone, starting next week).
|
|
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.