RTC Jazz Client API: How to get a work item category ID?
This is part of my code;
List<ICategory> findCategories= workItemService.findCategories(projectArea, ICategory.FULL_PROFILE, null);
Iterator<ICategory> i = findCategories.iterator();
while(i.hasNext()){
ICategory ic = i.next();
ICategoryHandle categoryHandle = (ICategoryHandle)ic;
ICategory category = (ICategory) repo.itemManager()
.fetchCompleteItem(categoryHandle, IItemManager.DEFAULT, null);
........
I can use category.getName() to get category name but how can I get the category item_id? It looks like this: _4q8WEMlTEeKzqIh7h7lAkg
Thansk!!!!
Accepted answer
Because ICategory is an auditable, the method getItemId should work
from the SDK
from the SDK
getItemId
UUID getItemId()
-
Returns the item id of this item. The item id gives items their identity.
-
- Returns:
-
the item id; never
null