Creating a plan using RTC Java APIs?
4 answers
private void createPlan(ProjectArea projectArea, String name, ITeamAreaHandle teamHandle,IIterationHandle iteration, String type) throws TeamRepositoryException{
IIterationPlanService planService= getService(IIterationPlanService.class);
IIterationPlanRecord planRecord= (IIterationPlanRecord) IIterationPlanRecord.ITEM_TYPE.createItem();
planRecord.setName(name);
planRecord.setIteration(iteration);
planRecord.setPlanType(type);
planRecord.setOwner(teamHandle);
planService.save(projectArea, planRecord, null);
}
See if this works.
IIterationPlanService planService= getService(IIterationPlanService.class);
IIterationPlanRecord planRecord= (IIterationPlanRecord) IIterationPlanRecord.ITEM_TYPE.createItem();
planRecord.setName(name);
planRecord.setIteration(iteration);
planRecord.setPlanType(type);
planRecord.setOwner(teamHandle);
planService.save(projectArea, planRecord, null);
}
See if this works.
Comments
Does the plan open through the RTC Eclipse client? As far as I recall, there was bug that prevented opening plans in Web UI (also Jazz may have issued a fix for some version - check with members on the Jazz team).
Comments
if I run my app on the system where I created the plans(4.0.3 GM). the missing plans show up in the list of all plans from
Never mind, dumb user error and poor checking on
planService.save(project, plan, wiki);
i used a bad IIteration Handle for the plan iteration. (iteration hadle not valid on this repository)
should have thrown an error.
Never mind, dumb user error and poor checking on
planService.save(project, plan, wiki);
i used a bad IIteration Handle for the plan iteration. (iteration hadle not valid on this repository)
should have thrown an error.
Comments
Guido Schneider
Jul 20 '12, 5:54 a.m.