Is there any timeline for when the ability to create milestones will be available in the API? I can see the type is reported in the resource_subtype field of the task, but it is read only. Is a new endpoint planned to modify this?
Hi @Kothar, now that milestones have officially launched, we will allow changing the resource subtype of tasks in the API. It won’t be done through a new endpoint, but rather through the existing PUT /tasks/<task-id> endpoint. I’ll update this thread once we’ve enabled writing to the resource_subtype field.
This is now available in the public API, and you can write to resource_subtype to change between "default_task" and "milestone". (Because of the upcoming sections deprecation we are not allowing clients to set this field to "section".)
“errors”: [
{
“message”: “projects: Cannot write this property”,
“help”: “For more information on API status codes and how to handle them, read the docs on errors: Errors”
}
In another occasion I was able to write resource_subtype to change between "default_task" and "milestone"
Darn. I know there’s a bug that can occur with setting a milestone on a new task, but it doesn’t apply to changing an existing one.
Are these tasks all in the same workspace/org or in different ones? Are they all attached to a project or are they sometimes not attached to any project? Are they all top-level tasks or sometimes a subtask?
Sorry I missed that - can you say a bit more about that? It works 99% of the time, 50%, etc? If you’re saying it works sometimes and not other times, that’s a whole different situation than it just not working at all.
Just to be clear, I don’t work for Asana; I’m just a volunteer and fellow developer.