create a plan programatically
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
https://rsjazz.wordpress.com/2015/06/11/creating-plans-with-the-plain-java-client-api/
what I know.
Comments
HI Ralph do you know if there are API's now to do this or is there some other way to pass in a list of teams and a sprint and have RTC create the plans for those teams? Thank you in advanced.
there ARE apis, cause product development uses them. They are not documented, which means they can/will change.
you can read the source, and maybe get lucky, but I have been all over that to solve problems without success.. and they do very ugly things, like save data in hashes connected to items, but not in the items themselves.. so discovery of the data is near impossible.
Plus, some parts are not in the Plain Java API https://rsjazz.wordpress.com/2015/06/11/creating-plans-with-the-plain-java-client-api/ uses API that is part of the RTC Eclipse client SDK and not the Plain Java Client Libraries.
No change. Plans are now "Web UI Only" and I don't expect java API.
Comments
Pooja Karda
Feb 03 '14, 9:17 p.m.Hello Mr. Rachid,