For a given task, is there a way to get comments of said task?
You can’t get “only” comments, as they are special kind of stories (task history).
So, you must query for all stories of that task, as described here
Then, filter the result with type = “comment”.
Because they’re hard to get and you must do a separate query for each task, my suggestion is always to keep them in a local cache, and use “task.modified_at” to invalidate your local cache and update the stories.
@Frederic_Malenfant is correct, but I’d like to make one tweak: the
type field on stories is deprecated—it’s leftover from when we didn’t have a great way to express the variety of stories in the API, and we’ve kept it in the API only for backwards compatibility. Instead, you should look at the
resource_subtype field for a
Thanks for the tip, I’ll update Bridge24 to use that filter.
I think you should update the documentation, as I copied it from
In the samples on the right, we can see the new resource_subtype = “comment_added” property, but also the deprecated type = “comment”.
Hey guys, I built an integration between Asana and another project management software(Odoo Project.) And I have a webhook setup to get me the updates that take place on a project and it’s task. The issue is that when I use the integration with a paid Organization, I get the event that has recourse subtype
comment_added , yet when I use a free workspace to test my integration I never get that event. Does this event get sent out only when we are using an Organization? What can I do to make my integration work with both types if I am right? Thank you in advance
Hey there – jumping in to ask a question about comments too. Stories/comments are for tasks only. Is there a resource to access project status update comments via API?
No, unfortunately not. You can get status updates but not comments on them.
This is exactly what I was looking for. However, I am testing the filter in the relevant API reference page (Get stories from a task), but when I add a string to filter the stories based on the resource_subtype field and the “comment_added” value, the reply is not filtered.
I tried the following:
Some help to figure this out would be much appreciated. Thanks!
When we talked about filtering, it’s on your side after you get the results.
You can’t use a parameter to filter the type of stories you want in return.