Welcome to the Jazz Community Forum
Need help creating an Iteration Plan

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.
Thanks,
Gaston
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

gastonw wrote:
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
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