How to add work item category programmatically in RTC project area ?
I am trying to add the work item category as a child for the root category "Unassigned" , it works fine when I add it manually but it does get added when I use the RTC API as shown below:
IAuditableClient auditableClient = (IAuditableClient) teamRepository
.getClientLibrary(IAuditableClient.class);
CategoriesManager catManager = CategoriesManager.createInstance(
auditableClient, projectArea, null);
CategoryTreeNode rootNode = catManager.getRoot();
CategoryTreeNode childCat = rootNode.createChild("childCategory");
catManager.save(monitor);
The code gets executed successfully but can not see the newly added child work item category in the project area.
Please correct me if I am missing anything.
Accepted answer
The code snippet is correct and it works perfectly fine( i tried it). Please recheck in eclipse client. Sometimes newly created items wont reflect in web UI. It should be there when checked from eclipse client.
Comments
1 vote
1 vote