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

Free Support Forum - aspose.com

Cross-project predecessor

Hello everyone,

I have a problem to create a link between tasks in two MS Project files.

Task t2 = t2 = parent.getChildren().add(“Another projet task”);
t2.set(Tsk.EXTERNAL_TASK_PROJECT, “xxxxx\\00100200000.mpp”);
t2.set(Tsk.EXTERNAL_ID, 30);
t2.set(Tsk.IS_EXTERNAL_TASK, true);
t2.set(Tsk.IS_MANUAL, new NullableBool(false));
t2.set(Tsk.IS_SUMMARY, false);

Task t = parent.add(“task”);

TaskLink link = project.getTaskLinks().add(t2, t);
link.setCrossProject(true);
link.setLinkType(TaskLinkType.FinishToStart);
link.setCrossProjectName(“xxx\\00100200000.mpp\\30”);

When I open the generated file, the link is made to the id 0 task of the other project.
image.png (9.9 KB)

Predecessor column contains id=0 instead of id=30 (of course, id 30 exists in linked file)
xxx\00100200000.mpp\0

Is it possible to link projects?
Do I have to read the linked project to link a task to it?
Does the linked project have to be accessible?

Thank you for your help.

@fcharlet,
we reproduced the issue and will fix it in the nearest release.
A ticket with ID TASKSNET-10722 has been created to resolve the issue. This thread has been linked with the issue so that you may be notified once the issue will be fixed.

The issues you have found earlier (filed as TASKSNET-10722) have been fixed in this update.

Thank you for your quick answer.
Can you fix it in the java version too?

@fcharlet,

The fix will be included to the next version of Aspose.Tasks for Java (22.12).