Jazz Register Log in
Jazz Forum Welcome to the Jazz Community Forum

Welcome to the Jazz Community Forum

Connect and collaborate with IBM Engineering experts and users

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.

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

0 votes



One answer

Permanent link
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

0 votes

Your answer

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

Search context
Follow this question

By Email: 

Once you sign in you will be able to subscribe for any updates here.

By RSS:

Answers
Answers and Comments
Question details
× 10,996

Question asked: Apr 24 '09, 3:59 p.m.

Question was seen: 6,237 times

Last updated: Apr 24 '09, 3:59 p.m.

Confirmation Cancel Confirm