create a plan programatically
I was able to create the plan and access it from eclipse without any issue, but when I tried to load the plan in a browser , I got the following error
Error - The plan is not available in the repository.
private void createPlan() throws TeamRepositoryException, UnsupportedEncodingException{
ProjectArea projectArea = (ProjectArea) getProjectName();
IIterationPlanService planService = (IIterationPlanService) ((IClientLibraryContext) repo).getServiceInterface(IIterationPlanService.class);
IIterationPlanRecord planRecord= (IIterationPlanRecord) IIterationPlanRecord.ITEM_TYPE.createItem();
IAuditableCommon audit = (IAuditableCommon) repo.getClientLibrary(IAuditableCommon.class);
planRecord.setName(cbPlanIteration.getSelectedItem() + " Plan");
planRecord.setIteration(getIterationName());
planRecord.setPlanType("Sprint Backlog");
planRecord.setOwner(getTeamAreaName());
IContributor contributor = (IContributor) IContributor.ITEM_TYPE.createItem();
IWikiPage wiki = (IWikiPage) IWikiPage.ITEM_TYPE.createItem();
wiki.setName("");
wiki.setWikiID(IIterationPlanRecord.OVERVIEW_PAGE_ID);
wiki.setCreator(contributor);
wiki.setOwner(planRecord);
planRecord.setContextId(planRecord.getItemId());
planService.save(projectArea, planRecord, wiki);
}
Any Idea ?
Error - The plan is not available in the repository.
private void createPlan() throws TeamRepositoryException, UnsupportedEncodingException{
ProjectArea projectArea = (ProjectArea) getProjectName();
IIterationPlanService planService = (IIterationPlanService) ((IClientLibraryContext) repo).getServiceInterface(IIterationPlanService.class);
IIterationPlanRecord planRecord= (IIterationPlanRecord) IIterationPlanRecord.ITEM_TYPE.createItem();
IAuditableCommon audit = (IAuditableCommon) repo.getClientLibrary(IAuditableCommon.class);
planRecord.setName(cbPlanIteration.getSelectedItem() + " Plan");
planRecord.setIteration(getIterationName());
planRecord.setPlanType("Sprint Backlog");
planRecord.setOwner(getTeamAreaName());
IContributor contributor = (IContributor) IContributor.ITEM_TYPE.createItem();
IWikiPage wiki = (IWikiPage) IWikiPage.ITEM_TYPE.createItem();
wiki.setName("");
wiki.setWikiID(IIterationPlanRecord.OVERVIEW_PAGE_ID);
wiki.setCreator(contributor);
wiki.setOwner(planRecord);
planRecord.setContextId(planRecord.getItemId());
planService.save(projectArea, planRecord, wiki);
}
Any Idea ?
Accepted answer
There is currently no public API to work with plans. That is one of the work items with priority in the current backlog.
https://rsjazz.wordpress.com/2015/06/11/creating-plans-with-the-plain-java-client-api/
what I know.
https://rsjazz.wordpress.com/2015/06/11/creating-plans-with-the-plain-java-client-api/
what I know.
Comments
Pooja Karda
Feb 03 '14, 9:17 p.m.