Jazz Forum Welcome to the Jazz Community Forum Connect and collaborate with IBM Engineering experts and users

Creating a plan using RTC Java APIs?

Can anyone provide some sample code to create a plan in RTC using Java APIs?

Thanks
Debdoot

0 votes

Comments

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

0 votes

Comments

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

0 votes

Comments

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

was this issue been resolved withe the Web UI ?

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

 


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



0 votes


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

0 votes

Comments

the plan type strings are here
com.ibm.team.apt.internal.common.plantype.PlanTypeIds

Your answer

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

Search context
Follow this question

By Email: 

Once you sign in you will be able to subscribe for any updates here.

By RSS:

Answers
Answers and Comments
Question details
× 11,051

Question asked: Aug 23 '10, 8:06 a.m.

Question was seen: 9,558 times

Last updated: Dec 11 '14, 9:05 a.m.

Confirmation Cancel Confirm