It's all about the answers!

Ask a question

Need help creating an Iteration Plan


Gaston Williams (81126) | asked Apr 24 '09, 3:59 p.m.
A co-worker is trying to create an iteration plan. She is able to create a working copy of an iteration plan and save it. There's no error from the save but the iteration plan is not showing up in the project area's Plans folder.

Does any have any suggestions on what we should do to get the newly created iteration plan to appear?

Here's a note from her discribing the issue, and the code that copies the iteration plan.

To clone an iteration plan, what i did is.
1.Initially accept project area to which it needs to be cloned through the wizard.
2. create the IterationPlanrecord and copy the selected iterationPlanRecord details to it.
3.using IIterationPlanService, I save the iterationplan to the teamarea which is by default first teamarea of the project area selected
am i missing anything.

The code to clone goes like this

IIterationHandle originalIterationHandle=planRecord.getIteration();
IRepositoryItemService repositoryItemService = getService(IRepositoryItemService.class);
IIteration originalIteration=null;
IIterationTypeHandle originalIterationTypeHandle=null;
IIterationType originalIterationType=null;
IIterationHandle workingCopyIterationHandle=null;
IIteration workingCopyIteration=null;
IIterationTypeHandle workingCopyIterationTypeHandle=null;
try
{
originalIteration=(IIteration)repositoryItemService.fetchItem(originalIterationHandle,IRepositoryItemService.COMPLETE);
originalIterationTypeHandle=originalIteration.getIterationType();
originalIterationType=(IIterationType)repositoryItemService.fetchItem(originalIterationTypeHandle,IRepositoryItemService.COMPLETE);

}
catch(TeamRepositoryException tre)
{
tre.printStackTrace();
}
IIterationType newworkingCopy=(IIterationType)originalIterationType.getWorkingCopy();
newworkingCopy.setProjectArea(targetProjectArea.getProjectArea());
IIteration newWorkingCopyIteration=(IIteration)originalIteration.getWorkingCopy();
newWorkingCopyIteration.setIterationType(newworkingCopy);
newWorkingCopyIteration.setDevelopmentLine(targetProjectArea.getDevelopmentLines());
newWorkingCopyIteration.setEndDate(originalIteration.getEndDate());
newWorkingCopyIteration.setStartDate(originalIteration.getStartDate());
//newWorkingCopyIteration.setChildren(originalIteration.getChildren());

workingCopyIIterationPlanRecord.setIteration(newWorkingCopyIteration);

and to save..
IIterationPlanService iterationPlanService = getService(IIterationPlanService.class);
IRepositoryItemService repositoryItemService = getService(IRepositoryItemService.class);
ITeamAreaHandle teamAreaHandle=(ITeamAreaHandle)targetProjectArea.getTeamAreas().get(0);
ITeamArea targetTeamArea=(ITeamArea)repositoryItemService.fetchItem(teamAreaHandle, IRepositoryItemService.COMPLETE);
workingCopyIIterationPlanRecord.setTeamArea(teamAreaHandle);
DTO_IterationPlanSaveResult saveResult=iterationPlanService.save(teamAreaHandle, workingCopyIIterationPlanRecord, null);
IIterationPlanRecord savedRecord=saveResult.getIterationPlanRecord();



Thanks,
Gaston

One answer



permanent link
Johannes Rieken (1.2k1) | answered May 05 '09, 4:48 a.m.
gastonw wrote:
A co-worker is trying to create an iteration plan. She is able to
create a working copy of an iteration plan and save it. There's no
error from the save but the iteration plan is not showing up in the
project area's Plans folder.

Does any have any suggestions on what we should do to get the newly
created iteration plan to appear?


Plans only show up when the selected iteration is marked as having a
deliverable. Maybe this is the missing piece.

Btw note that the Agile Planning Tooling does not *NOT* provide API and
that you are using internals which is not recommended as they are
subject to change without further notification and might not do what you
are expecting. See
https://jazz.net/jazz/resource/itemName/com.ibm.team.workitem.WorkItem/65697
for more details.

--
Cheers, Johannes
Agile Planning Team

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.