It's all about the answers!

Ask a question

How can I create the Notes wiki page during plan creation on server side?

Michele Pegoraro (1.8k14118103) | asked Nov 19 '12, 3:17 p.m.


I'm developing a initialization follow up in order to create some pre-defined plans.

I'm using something like this in order to create  a plan:

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

It seems to works and the plan is created, but it miss the first wiki page called Notes. This causes a problem when I try to open the plan on a browser. In this case the plan cannot be open and this error is given:

TypeError: Cannot read property 'length' of undefined
TypeError: Cannot read property 'length' of undefined
at dojo.declare.readTabDescriptors (https://localhost:9443/jazz/web/_js/?exclude=G&
at dojo.declare.constructor (https://localhost:9443/jazz/web/_js/?exclude=G&
at new (https://localhost:9443/jazz/web/_js/?include=G~&etag=shhIu2GMNw_it_IT&_proxyURL=%2Fjazz:15:22499)
at null. (https://localhost:9443/jazz/web/_js/?exclude=G&
at https://localhost:9443/jazz/web/_js/?include=G~&etag=shhIu2GMNw_it_IT&_proxyURL=%2Fjazz:15:15340
at null. (https://localhost:9443/jazz/web/_js/?exclude=G&
at null.fCallback (https://localhost:9443/jazz/web/_js/?include=G~&etag=shhIu2GMNw_it_IT&_proxyURL=%2Fjazz:15:15340)
at dojo.declare.callback (https://localhost:9443/jazz/web/_js/?exclude=G&
at dojo.declare.withItem (https://localhost:9443/jazz/web/_js/?exclude=G&
at dojo.declare.showIterationPlan (https://localhost:9443/jazz/web/_js/?exclude=G&

Using Eclipse client instead I can correctly open it.

How can I create the Notes page? I've try to create new IWikiPages but they are attached as other pages and not as notes.



Accepted answer

permanent link
Guido Schneider (3.4k1486115) | answered Nov 20 '12, 3:42 a.m.

Have you read my forum entry and my code snippet?

See section in the code:

 // setup wiki page

Michele Pegoraro selected this answer as the correct answer

Michele Pegoraro commented Nov 26 '12, 9:26 a.m.

The line


resolved the problem, togheter with a two step save: first I save the plan and then I add the notes. Otherwise as I try to set the plan itself as the owner of the note I got an error.



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.