Java API - ServerSide : Get priority name
Hello,
Do you know how get the label (name) of priority with the ID ?
"Identifier<IPriority> priorityValue = currentWorkItem.getPriority();"
Thanks,
Antoine
|
Accepted answer
from my pgm here, post 2,
https://jazz.net/forum/questions/94776/assertionfailedexception-problem-with-getting-the-values-of-attributes String[] iaval = ia .getValue(auditableClient, workItem, monitor).toString().split(":"); if (iaval.length > 1 && iaval[1] != null) { List<ILiteral> enumerationLiterals = enumeration .getEnumerationLiterals(); for (ILiteral literal : enumerationLiterals) { if (literal.getIdentifier2() .getStringIdentifier() .equalsIgnoreCase(iaval[1])) { System.out .println("\t\t\t\t --> attribute id=" + ia.getIdentifier() + ", type" + "=" + ia.getAttributeType() + " literal=" + literal .getIdentifier2() .getStringIdentifier() + " literal name=" + literal.getName()); break; } } } Antoine LELEU selected this answer as the correct answer
|
One other answer
Thanks,
i could fix my problem with your sample.
Antoine
|
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.