Is it possible to change the hierarchy of categories in ibm rtc. ? Or atleast change the parent of the categories.?
i want to change the hierarchy of the existing categories in ibm rtc using java client api. Any help on this regard is much appreciated.
Thank you. |
2 answers
// connect to the category manager
CategoriesManager catManager = CategoriesManager.createInstance(auditableClient, iprojectAreaHandle, null); // get the parent node CategoryTreeNode parent = catManager.getRoot(); // create a child CategoryTreeNode childCat = parent.createChild("child_cat_name"); |
public static void MoveICategory(ITeamRepository teamRepository, IProjectArea projectArea, IAuditableClient auditableClient, ICategoryHandle newParentCategoryHandle, ICategoryHandle childCategoryHandle){
CategoriesManager catManager = null;
CategoryTreeNode newParent = null;
CategoryTreeNode childCategoryTreeNode = null;
try {
catManager = CategoriesManager.createInstance(auditableClient, (IProjectAreaHandle) projectArea.getItemHandle(), null);
newParent = catManager.findNode(newParentCategoryHandle);
childCategoryTreeNode = catManager.findNode(childCategoryHandle);
childCategoryTreeNode.moveTo(newParent);
catManager.save(null);
} catch (TeamRepositoryException e) {
e.printStackTrace();
}
}
|
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.