How do I change a snapshot's name using the Jazz Plan Java API?
I've got an IBuildResult that has a valid snapshot (IBaselineSet) associated with it. I've been able to get a handle on the snapshot by fetching it as an extended contribution. I'm using the following snippet, which throws no exceptions; however, the change does not show up when browsing the snapshot in the Eclipse client. What do I need to do to get my snapshot's name updated?
//== Mutate snapshot to match new buildLabel IBuildResultContribution[] snapshotContribs = buildClient.getBuildResultContributions(parentBuild, new String[] { ScmConstants.EXTENDED_DATA_TYPE_ID_BUILD_SNAPSHOT}, monitor); IWorkspaceManager wkspcMgr = (IWorkspaceManager)repo.getClientLibrary(IWorkspaceManager.class); if(snapshotContribs != null) { IBaselineSetHandle bsHandle = (IBaselineSetHandle)snapshotContribs[0].getExtendedContribution(); IBaselineSet snapshot = (IBaselineSet)itemManager.fetchCompleteItem(bsHandle, ItemManager.REFRESH, monitor); wkspcMgr.setName(snapshot, "NewName - " + snapshot.getName(), monitor); }