It's all about the answers!

Ask a question

How projectArea.setProjectDevelopmentLine(developmentLine) work? How to set current iteration for project Area?


Andrew Ciaz (59164) | asked Feb 20 '20, 9:24 a.m.

 Hi al,

I write below code but it won't work:
IDevelopmentLine developmentLine = (IDevelopmentLine) repoService.fetchItem(projectDevelopmentLineHandle, null);
developmentLine.setCurrentIteration(iterationToBeSet);
projectArea.setProjectDevelopmentLine(developmentLine);

I implemented this code but the current iteration is not updated in the project area. Could you please help me to solve this issue?

Accepted answer


permanent link
Ralph Schoon (63.3k33646) | answered Feb 20 '20, 9:57 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
You can use Java Search for method setCurrentIteration() and find examples in the SDK e.g. in:
com.ibm.team.interop.service.tests.AbstractInteropServiceTest.setCurrentIteration(IProjectArea, String)

You need to get an iteration from the development line that you can actually set as current iteration. You don't have to set the development line, it should already be set.

Not sure if there is a special save operation needed.

Andrew Ciaz selected this answer as the correct answer

Comments
1
Ralph Schoon commented Feb 20 '20, 10:43 a.m. | edited Feb 20 '20, 10:44 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER

            devLine = (IDevelopmentLine) devLine.getWorkingCopy();
            devLine.setCurrentIteration(current);
            processServerService().saveProcessItem(devLine);

 
You use the IProcessItemService to save the working copy of the development line after setting the current iteration.

Your answer


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