0

I'm trying to get the amount of tasks that have a specific custom field. Is there a query that makes me fetch that?

If I try and fetch https://app.asana.com/api/1.0/projects/project-id/tasks I don't get the custom fields with it, if I try https://app.asana.com/api/1.0/projects/project-id/tasks?opt_fields=custom_fields I do get the custom fields with it, but not a count per custom field.

A bit of context: I'm trying to build a funnel in a dashboard.

thanks!!

  • Are you trying to get the number of tasks that have a particular custom field or do you want the number of tasks that have a particular value for a custom field? – Jeff Jul 21 '17 at 19:03
  • The first. But I kind of solved it with a work around. What I did: https://app.asana.com/api/1.0/projects/projectid/tasks?opt_pretty&opt_expand=(this%7Csubtasks%2B) and then did a countif on the enum value I was looking for. :) – Lennard Kooy Jul 22 '17 at 19:39

1 Answers1

0

I think you need to add the opt_fields.

"opt_fields":[
                    "custom_fields.name",
                    "custom_fields.text_value",
                    "custom_fields.enum_value",
                ]
Kubaba
  • 136
  • 1
  • 8