It's all about the answers!

Ask a question

Creating a plan using RTC Java APIs?

Debdoot Mukherjee (512118) | asked Aug 23 '10, 8:06 a.m.
Can anyone provide some sample code to create a plan in RTC using Java APIs?


Guido Schneider commented Jul 20 '12, 5:54 a.m.

Hello Debdoot, have you ever found a solution? may you post a code snippet for this, if you got it? thanks Guido

4 answers

permanent link
Debdoot Mukherjee (512118) | answered Jul 20 '12, 7:34 a.m.
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.setOwner(teamHandle);, planRecord, null);
See if this works.

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)

permanent link
Debdoot Mukherjee (512118) | answered Jul 20 '12, 10:44 a.m.
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).

Guido Schneider commented Jul 20 '12, 11:13 a.m.

Good point! The plan opens in Eclipse. I'm using V. I will test on 4.0. I'm in duscusion with Development on WI

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


permanent link
sam detweiler (12.5k6192201) | answered Dec 22 '13, 10:28 a.m.
edited Dec 23 '13, 8:46 a.m.
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, plan, wiki);

i used a bad IIteration Handle for the plan iteration.  (iteration hadle not valid on this repository)
should have thrown an error.

permanent link
Neha Malviya (623) | answered Dec 11 '14, 5:50 a.m.
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.

sam detweiler commented Dec 11 '14, 9:05 a.m.

the plan type strings are here

Your answer

Register or to post your answer.