Free Support Forum - aspose.cloud

Failed to add a task in ms project using Aspose.Tasks REST API

Hello.
I am using php sdk of aspose cloud task.
When I add a task to ms project, it succeeds in some files, but failed in other files.
Error code:
{“Error”:{“Code”:“error”,“Message”:"TaskEntity.Start is DateTime.MinValue Id = 1; Name = ; Duration = 0 mins; Start = 1/ (truncated…)
in C:\xampp5.6\htdocs\tasks\src\Aspose\Tasks\TasksApi.php:13952
Please help me fix the issue.
Thanks in advance.
Paul.

@paul1122

We will appreciate it if you please share a sample failing Microsoft Project file with us. We will investigate it and fix it accordingly.

Hello, thanks for your kind reply. This is the test file I failed. Kind regards.

@paul1122

I have tested the scenario using PostTask API method but unable to replicate the issue. I will appreciate it if you please share your sample code here as well. It will help us to address your issue exactly.

TestAspose.zip (236.5 KB)

Hello. I can’t open testaspose.mpp file. is it the file you added tasks?
This is a piece of code I had test.

$config = new Configuration();
$config->setAppKey(“MY_APP_KEY”);
$config->setAppSid(“MY_APP_SID”);
$tasks = new TasksApi(null, $config);
$remoteName = “test.mpp”;
$localName = “test.mpp”;
$response = $tasks->uploadFile($remoteName, $localName);
$response = $tasks->postTask(new Requests\PostTaskRequest($remoteName, “New task name”, null, null, “”, “”));
$newTaskUid = $response->getTaskItem()->getUid();

@paul1122

Thanks for sharing the sample code. We have reproduced the issue and logged a ticket TASKSCLOUD-422 for resolution. We will notify you as soon as it is resolved.

Yes, I added the task by setting beforeTaskId parameter value to 3 instead of default value. But seems you are unable to open the output file. We will investigate it as well in the above logged ticket.

Hello, any luck to fix the above issue?

@paul1122

I am afraid the issue is still pending for the investigation in the queue. We will update you as soon as we made some significant progress towards issue resolution.