# How to collapse all tasks

**URL:** <https://forum.asana.com/t/how-to-collapse-all-tasks/71225>\
**Category:** Ask the Community\
**Created:** [16 January 2020 15:41 UTC](https://forum.asana.com/t/how-to-collapse-all-tasks/71225 "2020-01-16T15:41:19Z")\
**Posts on this page:** 16\
**Page:** 1

<div class="post-metadata">

**Author:** ![anon73646463](https://luna1.co/8d76cd.png) [@anon73646463](https://forum.asana.com/u/anon73646463)\
**Post date:** [16 January 2020 15:41 UTC](https://forum.asana.com/t/how-to-collapse-all-tasks/71225/1 "2020-01-16T15:41:19Z")

</div>

How can I collapse all tasks at once instead of one task at a time?

---

<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:** [16 January 2020 16:01 UTC](https://forum.asana.com/t/how-to-collapse-all-tasks/71225/2 "2020-01-16T16:01:56Z")

</div>

Are you referring to sections? Not possible at the moment ☹

---

<div class="post-metadata">

**Author:** ![anon73646463](https://luna1.co/8d76cd.png) [@anon73646463](https://forum.asana.com/u/anon73646463)\
**Post date:** [16 January 2020 16:04 UTC](https://forum.asana.com/t/how-to-collapse-all-tasks/71225/3 "2020-01-16T16:04:02Z")

</div>

![asana capture](https://us1.discourse-cdn.com/asana/original/3X/a/8/a8c66ebbd5ebbb6a0a8af51d2ba44af25a21cfbf.png)

These bolded words highlighted in yellow are what I’m hoping to collapse all at once .

---

<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:** [16 January 2020 16:05 UTC](https://forum.asana.com/t/how-to-collapse-all-tasks/71225/4 "2020-01-16T16:05:38Z")

</div>

Yep, called sections, not able to collapse them all (yet, hoping we could soon)

---

<div class="post-metadata">

**Author:** ![anon73646463](https://luna1.co/8d76cd.png) [@anon73646463](https://forum.asana.com/u/anon73646463)\
**Post date:** [16 January 2020 16:24 UTC](https://forum.asana.com/t/how-to-collapse-all-tasks/71225/5 "2020-01-16T16:24:38Z")

</div>

Thank you!

---

<div class="post-metadata">

**Author:** ![Necat\_Bolpaca](https://sea2.discourse-cdn.com/asana/user_avatar/forum.asana.com/necat_bolpaca/32/3051_2.png) [@Necat\_Bolpaca](https://forum.asana.com/u/Necat_Bolpaca)\
**Post date:** [10 July 2020 16:59 UTC](https://forum.asana.com/t/how-to-collapse-all-tasks/71225/6 "2020-07-10T16:59:40Z")

</div>

I wrote a bookmarklet for collapse projects at “My tasks” (Sort by: Project view)

Because I have too many task but quite a few projects.

> <https://gist.github.com/anova/3015a03d44db2098d503303e7d1a2f5d>

This code (as bookmarklet) works for sections too (I tested a minute ago)

---

<div class="post-metadata">

**Author:** ![anon72909962](https://luna1.co/8d76cd.png) [@anon72909962](https://forum.asana.com/u/anon72909962)\
**Post date:** [23 December 2020 10:19 UTC](https://forum.asana.com/t/how-to-collapse-all-tasks/71225/7 "2020-12-23T10:19:44Z")

</div>

Fantastic, just what I was looking for.

NB when creating a bookmark for this, you only need the part in red for the bookmark URL

---

<div class="post-metadata">

**Author:** ![Yoav\_Crombie](https://sea2.discourse-cdn.com/asana/user_avatar/forum.asana.com/yoav_crombie/32/13770_2.png) [@Yoav\_Crombie](https://forum.asana.com/u/Yoav_Crombie)\
**Post date:** [3 January 2021 13:19 UTC](https://forum.asana.com/t/how-to-collapse-all-tasks/71225/8 "2021-01-03T13:19:05Z")

</div>

Hi Necat  
Can you explain how to use your precious code?

---

<div class="post-metadata">

**Author:** ![Craig\_Braun](https://sea2.discourse-cdn.com/asana/user_avatar/forum.asana.com/craig_braun/32/72374_2.png) [@Craig\_Braun](https://forum.asana.com/u/Craig_Braun)\
**Post date:** [2 March 2021 00:46 UTC](https://forum.asana.com/t/how-to-collapse-all-tasks/71225/9 "2021-03-02T00:46:41Z")

</div>

I also need this functionality. How would I implement your code?

---

<div class="post-metadata">

**Author:** ![anon76562658](https://luna1.co/8d76cd.png) [@anon76562658](https://forum.asana.com/u/anon76562658)\
**Post date:** [30 June 2021 19:48 UTC](https://forum.asana.com/t/how-to-collapse-all-tasks/71225/10 "2021-06-30T19:48:36Z")

</div>

Has there been any Asana updates that all you to collapse ALL SECTIONS at once, like Linda\_Lindsey referenced above?

---

<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:** [5 August 2021 11:44 UTC](https://forum.asana.com/t/how-to-collapse-all-tasks/71225/11 "2021-08-05T11:44:46Z")

</div>

No news. But now you can save as default a view where everything is collapsed!

---

<div class="post-metadata">

**Author:** ![Necat\_Bolpaca](https://sea2.discourse-cdn.com/asana/user_avatar/forum.asana.com/necat_bolpaca/32/3051_2.png) [@Necat\_Bolpaca](https://forum.asana.com/u/Necat_Bolpaca)\
**Post date:** [27 August 2021 17:33 UTC](https://forum.asana.com/t/how-to-collapse-all-tasks/71225/12 "2021-08-27T17:33:44Z")

</div>

Oh, sorry. I dont enter asana community for a long time and forgot this bookmarklet.

As @anon72909962 says you only need the “red part” (code as url) when register a bookmarklet.

Steps: (For chromium browsers, I am using edge)

ADDING BOOKMARKLET

1. Go to favorites (or bookmarks)  
1.a. For edge, this is edge://favorites  
1.b. For chrome, this is chrome://bookmarks

2. Add favorite or bookmark  
Name:  
asana collapse

URL:  
javascript:(function(){document.querySelectorAll(‘.TaskGroupHeader-toggleButton .DownTriangleIcon’).forEach(function(element){ element.parentNode.click() })}());

1. You need to “show bookmarks bar always” setting.

You have a bookmark at bookmark bar, and bookmark bar is always visible.

USING BOOKMARKLET

1. Go to My tasks and at List View choose Sort by Project
2. Click the bookmarklet at bookmarks bar.  
Note: Asana lazy loads projects so if you have many projects lazy loaded projects may loaded not collapsed after the first projects collapse. You may need click more than once.

Hope this instructions helps. (I tested the bookmarklet when writing this steps and selectors does not change, its still working ヽ(•‿•)ノ )

---

<div class="post-metadata">

**Author:** ![Richard\_Hunt](https://sea2.discourse-cdn.com/asana/user_avatar/forum.asana.com/richard_hunt/32/43581_2.png) [@Richard\_Hunt](https://forum.asana.com/u/Richard_Hunt)\
**Post date:** [29 September 2021 23:43 UTC](https://forum.asana.com/t/how-to-collapse-all-tasks/71225/13 "2021-09-29T23:43:31Z")

</div>

The bookmarklet doesn’t seem to work anymore (or I’m doing something wrong.)

Any advice?

---

<div class="post-metadata">

**Author:** ![Richard\_Hunt](https://sea2.discourse-cdn.com/asana/user_avatar/forum.asana.com/richard_hunt/32/43581_2.png) [@Richard\_Hunt](https://forum.asana.com/u/Richard_Hunt)\
**Post date:** [29 September 2021 23:44 UTC](https://forum.asana.com/t/how-to-collapse-all-tasks/71225/14 "2021-09-29T23:44:17Z")

</div>

Nevermind, I pasted the URL wrong. 😃

---

<div class="post-metadata">

**Author:** ![Necat\_Bolpaca](https://sea2.discourse-cdn.com/asana/user_avatar/forum.asana.com/necat_bolpaca/32/3051_2.png) [@Necat\_Bolpaca](https://forum.asana.com/u/Necat_Bolpaca)\
**Post date:** [16 December 2021 17:34 UTC](https://forum.asana.com/t/how-to-collapse-all-tasks/71225/15 "2021-12-16T17:34:42Z")

</div>

> [@Necat\_Bolpaca](#):
>
> javascript:(function(){document.querySelectorAll(’.TaskGroupHeader-toggleButton .DownTriangleIcon’).forEach(function(element){ element.parentNode.click() })}());

Correction for bookmarklet url: (I forgot mark the text with preformatted / monospaced, the single quote became an invalid javascript token)

There is the correct one:

`javascript:(function(){document.querySelectorAll('.TaskGroupHeader-toggleButton .DownTriangleIcon').forEach(function(element){ element.parentNode.click() })}());`

---

<div class="post-metadata">

**Author:** ![Emily\_Roman](https://sea2.discourse-cdn.com/asana/user_avatar/forum.asana.com/emily_roman/32/283076_2.png) [@Emily\_Roman](https://forum.asana.com/u/Emily_Roman)\
**Post date:** [31 May 2022 08:09 UTC](https://forum.asana.com/t/how-to-collapse-all-tasks/71225/16 "2022-05-31T08:09:54Z")

</div>

Closed on 31 May 2022 08:09 UTC


