Jazz Forum Welcome to the Jazz Community Forum Connect and collaborate with IBM Engineering experts and users

Obtain the Planned For Value of a Given WorkItem with Java Plain API

Hello,
I'd like to obtain the Planned For value set of a given workItem and print it in console as String.
how do I get it?

Thanks a lot for the help.

0 votes


Accepted answer

Permanent link
 Please have a look here http://rsjazz.wordpress.com/2012/10/05/handling-iterations-automation-for-the-planned-for-attribute/
Tiago Fernandez selected this answer as the correct answer

0 votes

Comments

Thank you for the response.

But for example I have an WorkItem number xxxx which the value of the Planned For field is "Release 1.0".
What I want to get in my script is the value "Release 1.0" for that work item number,
Do I have to set all that classes and code (like the link example) just to get that value?
Isn't there some few lines of code to do that more simple?

Thank you very much.

It was a little hard for me, but I could figure out how to obtain the Planned For value of a workitem using the class PathHelper of your example of the link. I did:

Already having the iAttribute....

 def plannedForHandle = workItem.getValue(iAttribute)
 PathHelper ph = new PathHelper(repo, new SysoutProgressMonitor());
 ph.calculateIterationPath(plannedForHandle);
 String paths = "IDPath: [" + ph.toIDPathString() + "] NamePath: (" + ph.toNamePathString() + ")";
 println "Planned For result is : " + paths

Thanks a lot for the help.

PS: My script is groovy, so I implemented the java way.

Your answer

Register or log in 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.

Search context
Follow this question

By Email: 

Once you sign in you will be able to subscribe for any updates here.

By RSS:

Answers
Answers and Comments
Question details
× 10,940
× 480
× 411
× 169

Question asked: Oct 03 '13, 4:15 p.m.

Question was seen: 5,665 times

Last updated: Oct 05 '13, 11:23 a.m.

Confirmation Cancel Confirm