How do I find the Current Iteration of a Project Area with the Java Server API?
Accepted answer
I solved the issue by just casting an IProcessArea as an IProjectArea.
IProjectArea projectArea = (IProjectArea) operation.getProcessArea();
I added this line to the beginning of the run method of my extension and then was able to use IProjectArea's getDevelopmentLines() and IDevelopmentLine's getCurrentIteration() calls to get the current iteration.
One other answer
Relevant code to answer your question:
- IProjectArea has .getDevelopmentLines() and .getProjectDevelopmentLine()
- IDevelopmentLine has .getCurrentIteration() which returns the current iteration.
- IIteration has .getDevelopmentLine()