Welcome to the Jazz Community Forum
[closed] Finding Changesets by Itemid or comment

Hi All,
I have to identify if a changeset exists in any stream,prior to creating a new one - so, i am retrieving the uuid during the creation and using it further. I tried using "haschangesets" method to find if a workspace or stream contains a changeset with a particular uuid. code snippet as below:
UUID uuid1 = UUID.valueOf(fChangeSet.getItemId().getUuidValue());
IChangeSetHandle csHandle = (IChangeSetHandle) IChangeSet.ITEM_TYPE.createItemHandle(uuid1, null);
IChangeSet csNEW = (IChangeSet) teamRepository.itemManager().fetchCompleteItem(csHandle, IItemManager.REFRESH, monitor);
cs.add(csHandle);
if(fWorkspace.hasChangeSets(cs, monitor))
It doesnt locate an existing changeset -> I tried with both Changeset and the handle as well.
2. I also tried using changeset-searchcriteria , but couldn't find an option to search by UUID, ItemID or comment.
Please advise.
Thanks
I have to identify if a changeset exists in any stream,prior to creating a new one - so, i am retrieving the uuid during the creation and using it further. I tried using "haschangesets" method to find if a workspace or stream contains a changeset with a particular uuid. code snippet as below:
UUID uuid1 = UUID.valueOf(fChangeSet.getItemId().getUuidValue());
IChangeSetHandle csHandle = (IChangeSetHandle) IChangeSet.ITEM_TYPE.createItemHandle(uuid1, null);
IChangeSet csNEW = (IChangeSet) teamRepository.itemManager().fetchCompleteItem(csHandle, IItemManager.REFRESH, monitor);
cs.add(csHandle);
if(fWorkspace.hasChangeSets(cs, monitor))
It doesnt locate an existing changeset -> I tried with both Changeset and the handle as well.
2. I also tried using changeset-searchcriteria , but couldn't find an option to search by UUID, ItemID or comment.
Please advise.
Thanks
The question has been closed for the following reason: "Other" by valli Jun 09 '15, 3:38 a.m.