MSP Export Issue

image

When gantt have resource and resource assignments, I dont think current msp export sevice is dealing with exporting resources correctly.

Please see attached image, in the xml file Resources tag is empty and items in Assignments tag are refereing a none existing resources hence the ResourceUID -65535 ResourceUID is a negative number

BTW, I am testing this with latest gantt version 8.0.10

Opps, I figured out.

need to do this

gantt.exportToMSProject({
tasks: {
‘StartVariance’: function (task) {
if (task.startVariance)
return task.startVariance;
else
return 0;
},
‘PercentWorkComplete’: function (task) {
return (task.progress + 0.1);
},
‘Custom’: function (task) {
return ‘Custom value’;
},
‘Custom 2’: ‘My Custom value’
}
});

Hello Qianhao,
By default, Gantt doesn’t add the resource data. You need to manually add it in the resources object. Also, you need to specify the IDs of the assigned resources for each task in the ResourceAssignments property of the tasks object.

You can check how it works in the following snippet: