It's all about the answers!

Ask a question

How to get the value of the Planned for attribute for a given workitem using RTC API.


Jazzuser user (68447) | asked Sep 12 '17, 6:54 a.m.

Hello All,

I want to get the value of the planned for the given workitem.

Currently i have the following logic :

 iattribute = workItemClient.findAttribute(currentWorkItem.getProjectArea(), attributeId, monitor);
 if (workitem.hasAttribute(iattribute)) {
                        Object value = workitem.getValue(iattribute);
                        System.out.println((null==value)?"no value":value.toString());
                    }
                  
I am getting the IIterationHandles for this in the value.

How to get the value, such as Unassigned, or the iteration value set to the workitem ?

Please assist.

Thanks.


Accepted answer


permanent link
Ralph Schoon (62.3k33643) | answered Sep 12 '17, 7:08 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
Jazzuser user selected this answer as the correct answer

Comments
Jazzuser user commented Sep 12 '17, 7:20 a.m.

Thanks for the reply Ralph.

I got the value using :
IIterationHandle iterHandle= workitem.getTarget();
IIteration iteration = (IIteration) teamRepository.itemManager()
                                .fetchCompleteItem((IIterationHandle) iterHandle,
                                        IItemManager.DEFAULT, monitor);
    System.out.println("iteration :" + iteration.getName());

Your answer


Register or to post your answer.