getting value from an enum of Workitem through Plain Java Library
Harish Raj (11●3●16●19)
| asked Feb 17 '14, 4:37 p.m.
edited Feb 18 '14, 1:53 p.m. by Fariz Saracevic (919●6●13)
Hi,
I looked at the Manipulating Work Item Enumeration Values. But it gives me an error at the method getIdentifier2() of ILiteral all the time. I tried 3.x version and even 4.x But no luck. It is quite urgent. Please help me. Thanks. private ILiteral getLiteralbyID(Identifier findLliteralID, IAttributeHandle iAttribute) throws TeamRepositoryException { IWorkItemClient workItemClient = (IWorkItemClient) teamRepository().getClientLibrary(IWorkItemClient.class); IEnumeration enumeration = workItemClient.resolveEnumeration(iAttribute, null); List literals = enumeration.getEnumerationLiterals(); for (Iterator iterator = literals.iterator(); iterator.hasNext();) { ILiteral iLiteral = (ILiteral) iterator.next(); if (iLiteral.getIdentifier2().equals(findLliteralID)) { return iLiteral; } } return null; } |
Accepted answer
see post 2 here https://jazz.net/forum/questions/94776/assertionfailedexception-problem-with-getting-the-values-of-attributes
routine PrintAttributes() detects what kind of attribute, then prints its value Harish Raj selected this answer as the correct answer
|
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.