Obtain the Planned For Value of a Given WorkItem with Java Plain API
Accepted answer
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.