DEV Community

Aubrey Portwood
Aubrey Portwood

Posted on • Edited on

2 1

How to show all subtasks in Asana

Okay, so the problem is simple, and if you're reading this you already know what it is: when you open a task with lots of subtasks you have to click Load more subtasks..., every time...

Screenshot

That's annoying, and Asana should change that. But, in the meantime, here's what you can do to beat the system.

First, download (and pay; it's worth it) WebCatalog and install Asana.

Screenshot

Once you do that you can run asana.com in a WebApp you can launch from your Applications. Sweet.

Now, the next part is simple. Go to the settings once you load the WebApp and goto Developers > JS Code Injection...

Gif

Add the below to the code section:

/**
 * Automatically Open Subtasks in Asana
 *
 * Note, if you use WebCatalog, just add this to the JS code
 * injection, it works.
 *
 * Also this version checks for links to click indefinitly, vs how
 * the original only ran for 10 seconds.
 *
 * @see   https://forum.asana.com/t/allow-to-load-all-sub-tasks-at-once/43620/12 Source
 */
(function () {

    window.setInterval(() => {

        let links = document.querySelectorAll('.SubtaskGrid-loadMore');

        if(links.length === 0){
            return;
        }

        Array.from(links).map((link) => {
            link.click();
        });
    }, 2000);
})();
Enter fullscreen mode Exit fullscreen mode

Restart the app and now, when you pull up a task, by the time you scroll down to the section for more sub-tasks it will have been expanded for you.

Image description

I would advise you take a look at the rest of the settings in the App too, and I personally use Choosy to open asana.com URL's in my Webapp.

SurveyJS custom survey software

JavaScript UI Libraries for Surveys and Forms

SurveyJS lets you build a JSON-based form management system that integrates with any backend, giving you full control over your data and no user limits. Includes support for custom question types, skip logic, integrated CCS editor, PDF export, real-time analytics & more.

Learn more

Top comments (1)

Collapse
 
aubreypwd profile image
Aubrey Portwood

Feel free to update 2000 in the script (which is 2 seconds) to something smaller (so it happens sooner and more often). Two seconds seems just-right for me.

Billboard image

Create up to 10 Postgres Databases on Neon's free plan.

If you're starting a new project, Neon has got your databases covered. No credit cards. No trials. No getting in your way.

Try Neon for Free →