It's all about the answers!

Ask a question

Check category as unassigned(project category) using server API


kavita herur (5876894) | asked Apr 08 '13, 9:01 a.m.

Hi All,

 I want to check in precondition that work item's category is unassigned (root category) then show error message to select different category.

ICategoryHandle category = workItem.getCategory();

if(category == null ){

 reporterror()

}

As unassigned is root category its not going in side if condition. Is there way to check its unassigned(root category)

 Thanks,

Kavita

One answer



permanent link
Dinesh Kumar B (4.1k413) | answered Apr 08 '13, 9:12 a.m.
JAZZ DEVELOPER
print the result of workItem.getCategory() when the category was set to unassigned, this would most likely return the ID associated with the unassigned literal.  use this id/value for comparison in your if statement.. not tested it.. just a quick thought... hope it helps..

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.