It's all about the answers!

Ask a question

Trying to create a sub category using java api


K M (38324950) | asked Aug 14 '15, 2:07 p.m.
            parentCategoryHandle = service.findCategoryByNamePath(project,namePath, MONITOR);
            if (parentCategoryHandle == null) {
                return "ERROR: Category " + categoryName + " parent not found";
            }
            // Create category
  (error line 272)          category = service.createSubcategory(parentCategoryHandle,categoryName,MONITOR);

Error I get is:
Exception in thread "main" org.eclipse.core.runtime.AssertionFailedException: assertion failed:
    at org.eclipse.core.runtime.Assert.isTrue(Assert.java:110)
    at org.eclipse.core.runtime.Assert.isTrue(Assert.java:96)
    at com.ibm.team.workitem.common.internal.util.CategoriesHelper.createCategoryId(CategoriesHelper.java:175)
    at com.ibm.team.workitem.common.internal.WorkItemCommon.createSubcategory(WorkItemCommon.java:738)
    at interations_releases.Repository.createCatagory(Repository.java:272)


            


Comments
K M commented Aug 18 '15, 10:13 a.m.

service is
        IWorkItemClient service = (IWorkItemClient) repo.getClientLibrary(IWorkItemClient.class);

Be the first one to answer this question!


Register or to post your answer.