How to get the list of Categories (Filed Against) for an workitem via API
Accepted answer
// connect to category manager for this project area
CategoriesManager catManager = CategoriesManager.createInstance(auditableClient, projectarea_handle, null);
// get the root node
CategoryTreeNode root = catManager.getRoot();
// loop thru the roots children
for (CategoryTreeNode nodei : root.getChildren())
{
}
note that this is a tree of categories, not a flat list.. so for each node, you need to check if there are children.
CategoriesManager catManager = CategoriesManager.createInstance(auditableClient, projectarea_handle, null);
// get the root node
CategoryTreeNode root = catManager.getRoot();
// loop thru the roots children
for (CategoryTreeNode nodei : root.getChildren())
{
}
note that this is a tree of categories, not a flat list.. so for each node, you need to check if there are children.