It's all about the answers!

Ask a question

How to get the story point values using server side API ?


vinitha dsouza (14719122) | asked Aug 04 '15, 2:56 a.m.
Hello team

I want to get the story point values of a workitem story using server side API.
Below is the code which i used (referred from
 https://rsjazz.wordpress.com/2012/08/20/manipulationg-work-item-enumeration-values/ ).
please let me know where I have gone wrong ?

if(attribute!=null && child.hasAttribute(attribute)){
            Object objval = child.getValue(attribute);

            if (objval instanceof Identifier) {
                Identifier literalID = (Identifier) objval;
                Notifications.addWarning("story point value  '" +  "'. check here ");
                ILiteral literal = getLiteralbyID(literalID, attribute);
                String displayValue = literal.getName();
    }

private static  ILiteral getLiteralbyID(Identifier findLliteralID, IAttribute attribute) throws TeamRepositoryException {

     IEnumeration enumeration = fWorkItemCommon.resolveEnumeration(attribute, 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;
    }

One answer



permanent link
Ralph Schoon (63.1k33646) | answered Aug 04 '15, 3:16 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
Since you don't explain what the problem is you have, how could any one answer that question?
I would also suggest to look at the object that you get for stories in a debugger. Based on that you can decide what you get and what to do with it. the link above has a link to a blog that explains how to set up for debugging.

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.