It's all about the answers!

Ask a question

create a plan programatically


Rachid Halloul (144) | asked Dec 19 '12, 1:13 p.m.
edited Jul 19 '16, 3:39 a.m. by Ralph Schoon (63.5k33646)
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 ?

Comments
Pooja Karda commented Feb 03 '14, 9:17 p.m.

Hello Mr. Rachid, 


Any update on your above question. I'm also facing same problem. Could you please some knowledge on how to create plans pro-grammatically. 

Thank you.

Accepted answer


permanent link
Ralph Schoon (63.5k33646) | answered Dec 19 '12, 5:02 p.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
edited Jul 18 '16, 3:57 p.m.
 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.
Ralph Schoon selected this answer as the correct answer

Comments
John Cabral commented Jul 18 '16, 11:02 a.m. | edited Jul 18 '16, 3:57 p.m.

 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.




sam detweiler commented Jul 18 '16, 1:52 p.m. | edited Jul 18 '16, 1:53 p.m.

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.


Ralph Schoon commented Jul 18 '16, 3:56 p.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER

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.

Your answer


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