It's all about the answers!

Ask a question

Is it possible to change the hierarchy of categories in ibm rtc. ? Or atleast change the parent of the categories.?


Pooja Karda (13711) | asked May 19 '14, 8:34 a.m.
edited May 19 '14, 8:35 a.m.
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



permanent link
Yavuz Yasin CELIK (51510) | answered Jul 30 '15, 1:43 a.m.
 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();
}
}

permanent link
sam detweiler (12.5k6195201) | answered May 19 '14, 9:10 a.m.
edited May 19 '14, 9:10 a.m.
// 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");

Your answer


Register or to post 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.