We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Issue 9) WBS ID Creating problem

I am dongsoon park

I Have a another problem.(Issue 9)
When I add new Task, MS Project create WBS ID automatically.
But It's value is wrong.

1. Execute GMPWbsTestBasic.java
2. Open result.mpp
3. Add New Task.
4. If you see the new WBS id, It is not Unique value. I think that It is wrong

Please help me.

Hi Dongsoon,

Thank you for sharing your concern with us.

I was able to reproduce this issue at my end using the latest version of Aspose.Tasks for Java 6.9.0 and have logged it as TASKS-33750 in our issue tracking system for further investigation by our development team. Once there is any information available in this regard, I’ll update you here via this thread.

There is another issue which causes an exception if we run this project using Aspose.Tasks for Java 7.0.0. That issue of “Null ParentProject” is also logged as TASKS-33749 in our issue tracking system.

We are sorry for the inconvenience caused to you.

Hi Dongsoon,

We have analyzed the issue TASKS-33750 and it is observed that its not a bug of Aspose.Tasks.

By default, when you add a new task in MS PRoject WBS for the task equals to OutlineNumber. You can edit WBS field manually in MSP. But when you insert a new task, WBS will be equal to OutlineNumber anyway, even if you set WBS manually before for another tasks. This can be seen in the “IssueSnapshot” clearly. Here is attached screenshot (“Adding new task”) that describes this issue as MSP feature.

Hi Dongsoon,

We have analyzed the issue TASKS-33749 and observed that the exception was raised due to not updated references in file “GMPWbsTestBasic.java”.
To fix it add after line No 133 (“parentTask.getChildren().add(newTask);”) the following line: prj.updateReferences();

This code works fine with Aspose.Tasks for Java 6.9.0 and 7.0.0.

// set Task

Task newTask = new Task();




newTask.setWbsLevel(String.valueOf(Integer.parseInt(level) + 1));

newTask.setOutlineLevel(Integer.parseInt(level) + 1);

if (!"".equals(planStart)) {



if (!"".equals(planEnd)) {



if (!"".equals(realEnd)) {





newTask.setDuration(Long.parseLong(planDuration) * OneHour * 8);

Task parentTask = null;

if (level.equals(“0”))

parentTask = prj.getRootTask();


parentTask = levTask.get(Integer.parseInt(level) - 1);

levTask.put(Integer.parseInt(level), newTask);


prj.updateReferences(); // <-- this line is necessary

The issues you have found earlier (filed as ) have been fixed in this update. This message was posted using BugNotificationTool from Downloads module by MuzammilKhan