It's all about the answers!

Ask a question

How to get the list of Categories (Filed Against) for an workitem via API


EclipseTalk . (32736161) | asked Jan 07 '15, 3:18 p.m.
edited Jan 08 '15, 8:23 a.m. by Ralph Schoon (63.7k33648)
Hello,
How to get the list of Categories (Filed Against) for an workitem via API
Thank you

Accepted answer


permanent link
sam detweiler (12.5k6195201) | answered Jan 08 '15, 7:29 a.m.
                // 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.

EclipseTalk . selected this answer as the correct answer

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.