How do I find the Current Iteration of a Project Area with the Java Server API?
I'm looking to be able to make changes to a workitem and linked workitems whenever the workitem is moved into our current iteration. Is there anything in the APIs that can find what the project's current iteration is?
|
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.
Ralph Schoon selected this answer as the correct answer
|
One other answer
Relevant code to answer your question:
Comments
Shawn Carroll
commented Nov 29 '18, 12:13 p.m.
I'm able to get the IProjectAreaHandle from workitem.getProjectArea() but when I try to use the IRepositoryItemService.fetchItem() to get the full item from the handle, I get a null value. How do I actually get an IProjectArea object to begin that chain?
IProjectArea projectArea = (IProjectArea) repositoryItemService.fetchItem(workItem.getProjectArea(), IRepositoryItemService.COMPLETE);
Ex:
* @return the item for the given item handle; the item has all its
|
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.