# Problems with subtasks endpoint

**URL:** <https://forum.asana.com/t/problems-with-subtasks-endpoint/183027>\
**Category:** API & Developers\
**Created:** [21 July 2022 05:58 UTC](https://forum.asana.com/t/problems-with-subtasks-endpoint/183027 "2022-07-21T05:58:38Z")\
**Posts on this page:** 15\
**Page:** 1

<div class="post-metadata">

**Author:** ![user4](https://sea2.discourse-cdn.com/asana/user_avatar/forum.asana.com/user4/32/108029_2.png) [@user4](https://forum.asana.com/u/user4)\
**Post date:** [21 July 2022 05:58 UTC](https://forum.asana.com/t/problems-with-subtasks-endpoint/183027/1 "2022-07-21T05:58:38Z")

</div>

Hi, I’m trying to use Asana’s API to work with the subtasks.

In the UI, I can see that we can work with custom fields, and API documentation also includes “custom\_fields” in the examples. But I’ve tried to get subtask’s custom\_fields, and it didn’t work.

 ![Screen Shot 2022-07-21 at 9.51.55 AM](https://us1.discourse-cdn.com/asana/original/3X/a/d/ad9d5d86194e16b3bf3c2fa68ebbfd54fb6bd477.png)

Also, in the UI, I can see that subtasks include stories about history. But in the documentation, I didn’t find anything about subtasks stories. Also, The API doesn’t return that field in the response.

Could you help me to understand those cases?

Thanks,  
Nairi

---

<div class="post-metadata">

**Author:** ![Bastien\_Siebman](https://sea2.discourse-cdn.com/asana/user_avatar/forum.asana.com/bastien_siebman/32/172354_2.png) [@Bastien\_Siebman](https://forum.asana.com/u/Bastien_Siebman)\
**Post date:** [21 July 2022 06:12 UTC](https://forum.asana.com/t/problems-with-subtasks-endpoint/183027/2 "2022-07-21T06:12:25Z")

</div>

Hi,

I think I’ve read somewhere that you can’t ask for `custom_fields` as a whole anymore, you need to ask for example for `custom_field.gid` or any other field you need.

Regarding stories, a subtask is a regular task so you should be able to query them just like you would with tasks.

---

<div class="post-metadata">

**Author:** ![Phil\_Seeman](https://sea2.discourse-cdn.com/asana/user_avatar/forum.asana.com/phil_seeman/32/81525_2.png) [@Phil\_Seeman](https://forum.asana.com/u/Phil_Seeman)\
**Post date:** [21 July 2022 14:19 UTC](https://forum.asana.com/t/problems-with-subtasks-endpoint/183027/3 "2022-07-21T14:19:37Z")

</div>

> [@Bastien\_Siebman](#):
>
> I think I’ve read somewhere that you can’t ask for `custom_fields` as a whole anymore,

No, you can still ask for `opt_fields=custom_fields`.

> [@user4](#):
>
> I’ve tried to get subtask’s custom\_fields, and it didn’t work.

The answer is a bit complicated… First, you have to remember three things:

1. Custom fields are associated with a project (in the API, this is represented by `custom_field_settings`).
2. There are two types of custom fields: global (in your organization’s Custom Fields Library) and project-specific.
3. By default subtasks aren’t attached to their parent task’s project, and in that state, the subtask has no custom fields associated with it; it just inherits whatever custom fields its parent is associated with.

Now let’s take an example. Say the top-level task you’re querying is named **My Top-Level Task** and it’s in **Project A**. Also say that **Project A** has two custom fields associated with it, **Custom Field 1** and **Custom Field 2**.

**Custom Field 1** is a global custom field. **Custom Field 2** is a project-specific custom field only in **Project A**.

You create a subtask underneath **My Top–Level Task** ; let’s call it **My Subtask**. You give **My Subtask** a value in both **Custom Field 1** and **Custom Field 2**.

Now… If you keep **My Top-Level Task** in **Project A** and run your `tasks/{task_gid}/subtasks?opt_fields=custom_fields` query, you’ll see both **Custom Field 1** and **Custom Field 2** in the data for **My Subtask** , because its parent task is in a project which has both of those fields associated with it. You can also see this reflected in the Asana web UI, where if you look at the detail pane for **My Subtask** you’ll see it refers to those custom fields as “inherited fields”.

Now remove **My Top-Level Task** from **Project A** , such that it’s no longer in any project at all. Re-run your query. For **My Subtask** in the results, you should only see data for **Custom Field 1** , but NOT for **Custom Field 2**. (And in the detail pane for **My Subtask** in the web UI, in the “inherited fields” area you will see it only shows **Custom Field 1.** )

You no longer see the data for **Custom Field 2** because (a) that custom field is specific to **Project A** and (b) **My Subtask** ’s parent task is no longer in **Project A** so it’s no longer associated with **Custom Field 2** - which means that, per my point #3 above, **My Subtask** has no inherited association with **Custom Field 2** and thus it won’t show for that subtask.

I’m 96.5% sure that what you’re experiencing can be explained by the above info. See if that’s true.

> [@user4](#):
>
> I didn’t find anything about subtasks stories. Also, The API doesn’t return that field in the response.

Stories are a different object; you can’t get them in task-based queries. To get the stories for a task (or for a subtask; as Bastien says, in this case a subtask is identical to a task for getting its stories), you’ll need to do another API call using [a Stories endpoint](https://developers.asana.com/docs/get-stories-from-a-task).

---

<div class="post-metadata">

**Author:** ![user4](https://sea2.discourse-cdn.com/asana/user_avatar/forum.asana.com/user4/32/108029_2.png) [@user4](https://forum.asana.com/u/user4)\
**Post date:** [26 July 2022 16:40 UTC](https://forum.asana.com/t/problems-with-subtasks-endpoint/183027/4 "2022-07-26T16:40:44Z")

</div>

Hi Phil, thank you for the information.

Could you check this specific case with me?

Here I have a project-level task. Which has a custom field and a subtask.

 ![Screen Shot 2022-07-26 at 8.36.10 PM](https://us1.discourse-cdn.com/asana/original/3X/f/0/f095eb7d55242bc8eb72981aeb3a48074307640c.png)

And this is the subtask view. As we can see, the custom field is inherited.

 ![Screen Shot 2022-07-26 at 8.38.03 PM](https://us1.discourse-cdn.com/asana/original/3X/e/9/e97f66c547647ed7ea683ed5d59ea33fef23a13e.png)

But that custom field isn’t returned by the API. Overall “custom\_field” field is missing from the API response. I can verify that I was able to get the stories, and the changes about custom fields are visible inside the stories.

 ![Screen Shot 2022-07-26 at 8.40.28 PM](https://us1.discourse-cdn.com/asana/original/3X/5/1/5130642a32c57edc3d32b72209fb980dc51527b7.png)

---

<div class="post-metadata">

**Author:** ![Phil\_Seeman](https://sea2.discourse-cdn.com/asana/user_avatar/forum.asana.com/phil_seeman/32/81525_2.png) [@Phil\_Seeman](https://forum.asana.com/u/Phil_Seeman)\
**Post date:** [28 July 2022 02:57 UTC](https://forum.asana.com/t/problems-with-subtasks-endpoint/183027/5 "2022-07-28T02:57:52Z")

</div>

@user4,

![image](https://us1.discourse-cdn.com/asana/original/3X/f/2/f28ff9754ad8782ac38cad0676786c5bc1b7ba58.png)

You’re on the Free version of Asana which does not support custom fields; I assume that’s the issue here.

---

<div class="post-metadata">

**Author:** ![user4](https://sea2.discourse-cdn.com/asana/user_avatar/forum.asana.com/user4/32/108029_2.png) [@user4](https://forum.asana.com/u/user4)\
**Post date:** [2 August 2022 20:29 UTC](https://forum.asana.com/t/problems-with-subtasks-endpoint/183027/6 "2022-08-02T20:29:38Z")

</div>

Thank you for the information. For the Pro trial, it worked well.

Do you know why stories don’t include `enum_custom_field_changed` events?

I try to add/change custom field values, but there are no any events for those actions.

---

<div class="post-metadata">

**Author:** ![Phil\_Seeman](https://sea2.discourse-cdn.com/asana/user_avatar/forum.asana.com/phil_seeman/32/81525_2.png) [@Phil\_Seeman](https://forum.asana.com/u/Phil_Seeman)\
**Post date:** [3 August 2022 12:46 UTC](https://forum.asana.com/t/problems-with-subtasks-endpoint/183027/7 "2022-08-03T12:46:13Z")

</div>

> [@user4](#):
>
> Do you know why stories don’t include `enum_custom_field_changed` events?

I haven’t worked with stories myself, but from the information I have, I don’t think there’s an `enum_custom_field_changed` event; I believe this is what you see for that scenario:

```auto
// Enum custom field changed
"change": {
  "field": "custom_fields",
  "action": "changed",
  "new_value": {
    "gid": "590432",
    "resource_type": "custom_field",
    "resource_subtype": "enum",
    "enum_value": {
      "gid": "5893024",
      "resource_type": "enum_option"
    },
  }
}

```

---

<div class="post-metadata">

**Author:** ![user4](https://sea2.discourse-cdn.com/asana/user_avatar/forum.asana.com/user4/32/108029_2.png) [@user4](https://forum.asana.com/u/user4)\
**Post date:** [4 August 2022 08:57 UTC](https://forum.asana.com/t/problems-with-subtasks-endpoint/183027/8 "2022-08-04T08:57:37Z")

</div>

Thank you for your answer. Which object should include this object, `custom_field` object itself?

---

<div class="post-metadata">

**Author:** ![user4](https://sea2.discourse-cdn.com/asana/user_avatar/forum.asana.com/user4/32/108029_2.png) [@user4](https://forum.asana.com/u/user4)\
**Post date:** [4 August 2022 09:36 UTC](https://forum.asana.com/t/problems-with-subtasks-endpoint/183027/9 "2022-08-04T09:36:08Z")

</div>

Phil if you check my first screenshots you will see an ‘enum\_custom\_field\_changed’ event in stories. But it’s another account project.

 ![Screen Shot 2022-08-04 at 1.34.52 PM](https://us1.discourse-cdn.com/asana/original/3X/8/8/883480fceb25ead8689877bb2fc25bbb1a8c2dbc.png)

---

<div class="post-metadata">

**Author:** ![Phil\_Seeman](https://sea2.discourse-cdn.com/asana/user_avatar/forum.asana.com/phil_seeman/32/81525_2.png) [@Phil\_Seeman](https://forum.asana.com/u/Phil_Seeman)\
**Post date:** [6 August 2022 01:12 UTC](https://forum.asana.com/t/problems-with-subtasks-endpoint/183027/10 "2022-08-06T01:12:49Z")

</div>

> [@user4](#):
>
> you will see an ‘enum\_custom\_field\_changed’ event in stories.

Wow, look at that - sure enough, there is one!

I don’t know why you wouldn’t see it in your other workspace. Are you a guest in that workspace; that might explain it?

---

<div class="post-metadata">

**Author:** ![user4](https://sea2.discourse-cdn.com/asana/user_avatar/forum.asana.com/user4/32/108029_2.png) [@user4](https://forum.asana.com/u/user4)\
**Post date:** [7 August 2022 18:34 UTC](https://forum.asana.com/t/problems-with-subtasks-endpoint/183027/11 "2022-08-07T18:34:23Z")

</div>

I use a new Asana Sandbox Developer account. I’m not sure if it’s related.

This seems odd to me.

How can we verify that this is not an API issue?

Thanks,  
Nairi

---

<div class="post-metadata">

**Author:** ![Phil\_Seeman](https://sea2.discourse-cdn.com/asana/user_avatar/forum.asana.com/phil_seeman/32/81525_2.png) [@Phil\_Seeman](https://forum.asana.com/u/Phil_Seeman)\
**Post date:** [7 August 2022 19:27 UTC](https://forum.asana.com/t/problems-with-subtasks-endpoint/183027/12 "2022-08-07T19:27:51Z")

</div>

@Andrew-asana can you help here?

---

<div class="post-metadata">

**Author:** ![user4](https://sea2.discourse-cdn.com/asana/user_avatar/forum.asana.com/user4/32/108029_2.png) [@user4](https://forum.asana.com/u/user4)\
**Post date:** [7 August 2022 20:18 UTC](https://forum.asana.com/t/problems-with-subtasks-endpoint/183027/13 "2022-08-07T20:18:17Z")

</div>

I’ve verified that this event becomes visible after some time when the custom field is changed.

Thank you,

---

<div class="post-metadata">

**Author:** ![user4](https://sea2.discourse-cdn.com/asana/user_avatar/forum.asana.com/user4/32/108029_2.png) [@user4](https://forum.asana.com/u/user4)\
**Post date:** [7 August 2022 20:18 UTC](https://forum.asana.com/t/problems-with-subtasks-endpoint/183027/14 "2022-08-07T20:18:56Z")

</div>

No need for furthermore investigations 🙂

---

<div class="post-metadata">

**Author:** ![system](https://sea2.discourse-cdn.com/asana/user_avatar/forum.asana.com/system/32/276370_2.png) [@system](https://forum.asana.com/u/system)\
**Post date:** [30 May 2025 18:56 UTC](https://forum.asana.com/t/problems-with-subtasks-endpoint/183027/15 "2025-05-30T18:56:36Z")

</div>

Closed on 30 May 2025 18:56 UTC


