Creating a plan using RTC Java APIs?
Can anyone provide some sample code to create a plan in RTC using Java APIs?
Thanks Debdoot |
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. Comments
Guido Schneider
commented Jul 20 '12, 9:45 a.m.
Thank you. With this I do not get an exception on save. The plan is created and I can select it on the UI. BUT: if I open the plan I get now a runtime error on the UI: "Error - [object Object] TypeError: _89 is undefined" or "[Error - [object Object] TypeError: 'length' is null or not an object" (both seen) |
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
Guido Schneider
commented Jul 20 '12, 11:13 a.m.
Good point! The plan opens in Eclipse. I'm using V.3.0.1.3. I will test on 4.0. I'm in duscusion with Development on WI https://jazz.net/jazz/web/projects/Rational%20Team%20Concert#action=com.ibm.team.workitem.viewWorkItem&id=65697
Rachid Halloul
commented Dec 13 '12, 9:32 a.m.
was this issue been resolved withe the Web UI ?
sam detweiler
commented Dec 19 '13, 3:57 p.m.
This doesn't work for me. 3.0.1.3. I get no errors, but nothing appears.
I left off the wiki to try, still nothing.
I did get a permissions error the first time, as I didn't have plan save permission
|
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. |
Hi ...
I am trying to create Plan using java code mentioned above but facing some issues like which all API support
IIterationPlanService ,IIterationPlanRecord . Also not clear about the String type mentioned over here.
Can some one help me to get the working code for creating plan.
Comments
sam detweiler
commented Dec 11 '14, 9:05 a.m.
the plan type strings are here
|
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.
Comments
Hello Debdoot, have you ever found a solution? may you post a code snippet for this, if you got it? thanks Guido