Allow to load all sub-tasks at once

I think the tools is not meant to be used with a lot of subtasks. @Todd_Cavanaugh wrote a good piece about subtasks: To Subtask or not to Subtask

1 Like

Hi @Madelyn_Montoya and welcome to the Forum!

Thank you so much for sharing your thoughts and feedback with us! We already have a thread on this topic, so in order to consolidate feedback and votes on this topic, I’ve gone ahead and merged your post with the existing thread :slight_smile:

The ability to use the subtask feature is why I got so excited about Asana last week.

I work in higher ed, and we have a project where I need to build program audits per major and minor, per academic year. I share the project board with others who have different roles, so in order not to clutter up the task board, I created a task per academic year with the ~55 programs. It’s not that many, and it’s nice to keep them all together because that is how we structure degree requirements—by catalog/academic year.

Since I need basic functionality to simply track note-to-self type of reminders as subtasks (no emailing subtasks, exporting to JSON, viewing in a calendar, etc.), since all I need is to see it appear in the tasks list view to make sure I check them all off at some point, the subtasking feature is perfect.

But the lack of an option to load them all at once, especially as I switch up to the parent task every time I complete one major/minor, is really annoying!

1 Like

P.S.

Just found a workaround solution, since I try not to install too many Chrome extensions: right-click the bubble icon to open the subtask in a new tab :sweat_smile:

Nice! I’m using this as a starting point for my own script. It looks to me like this code will run once per second, and after it has run 10 times will stop running. The disadvantage of this approach is clicking around in Asana doesn’t always reload the page since it’s a web app. So if after 10 seconds you click on a different task, it won’t click the “Load More Subtasks” links for that task. Although if you reload the page after that it will. I think if you just get rid of the call to window.clearInterval() it will work fine, but it will keep running continuously every second. Having to reload is not so bad, but running the loop an arbitrary 10 times is not the best approach. Instead you could check to see if there is anything that has been clicked, and then stop call window.clearInterval(). This would still require the user to refresh the page after selecting a new task, so just not calling clearInterval() at all is still a good option for people to consider.

Once my script is tested and working, I will post it here. Mine will also click the “X more comments” links and the “See More” links that reveal the full text of long comments. There will be boolean flags at the start of the script to turn each of these features off if you only want to use some of them. Keep in mind Vivaldi supports adding these scripts to your extensions page out of the box without having to install the Tampermonkey extension. You just have to enable developer mode and then drag the script to your extensions page. Vivaldi is not officially supported by Asana, but works well enough once you start making your own scripts to get things working the way you want.

Here you go. This Tampermonkey/UserScript will by default load all subtasks, comments, and full comment text. It will run indefinitely so you don’t have to refresh after selecting a different task. It also refocuses on the task description after clicking on something so you are not left with the focus moved toward the bottom of the page on whatever was clicked on last. Most of those features can be turned off by changing the boolean flags toward the top of the script:

// ==UserScript==
// @name         Asana Load All
// @version      0.2
// @description  Auto click "Load More Subtasks", "x more comments", and "See More" links
// @match        *://*.app.asana.com/*
// @run-at       document-idle
// ==/UserScript==

(function() {
    'use strict';

    // user settings/config
    const enableLoadAllSubtasks = true
    const enableLoadAllComments = true
    const enableLoadAllFullCommentText = true
    const keepRunningIndefinitely = true

    const clickAllQuerySelector = function (querySelector) {
        let clickAllIntervalId = null
        clickAllIntervalId = window.setInterval(
            () => {
                let found = false
                for (const link of document.querySelectorAll(querySelector)) {
                    // prevents infinite loop where comments get shown and then hidden over and over
                    if (!link.innerHTML.toLowerCase().includes('hide')) {
                        console.log('clicking link')
                        link.click()
                        found = true
                    }
                }
                if (!keepRunningIndefinitely && !found && clickAllIntervalId != null) {
                    window.clearInterval(clickAllIntervalId)
                }
                if (found) {
                    // prevents page from staying focused toward bottom on what this script clicked on last
                    const taskName = document.querySelector('textarea[aria-label="Task Name"]')
                    if (taskName != null) {
                        console.log('scrolling to task name')
                        // for some reason it works more reliably if it runs later
                        setTimeout(() => { taskName.scrollIntoView() }, 2000)
                    }
                }
            },
            1000 // one second delay
        )
    }

    if (enableLoadAllSubtasks) {
        // click "Load More Subtasks" links
        clickAllQuerySelector('.SubtaskGrid-loadMore')
    }
    if (enableLoadAllComments) {
        // click "x more comments" links
        clickAllQuerySelector('.TaskStoryFeed-expandLink')
    }
    if (enableLoadAllFullCommentText) {
        // click "See More" links
        clickAllQuerySelector('.TruncatedRichText-expand')
    }
})();
1 Like

I edited my script to make scrolling back to the top of the task work more reliably.

So, years ago. Let me guess: Asana did not build in an single button in this 2-3 years, right?..

Do you really think a multi-million dollars company would ignore a “simple” feature if there wasn’t more to it?

Such a button would:

  1. clutter the interface
  2. push people to use subtasks even more
  3. be very server resource intense
  4. require an update to the Guide
  5. make the tool harder to test

Be sure that they do discuss those often, they just didn’t find the right reason or way to do it probably.

(I don’t work for Asana, this is my personal view)

Yes, in fact that is what has happened here. A simple settings option would do. There are scenarios where this would be most useful and cut down workload scrolling and reloading tasks greatly.

2 Likes

When I click into a task with many subtasks, it can be annoying to have to click “load more subtasks” every time. I would prefer if more subtasks were loaded, that they would stay loaded and when i click into a subtask and then click back into the parent task. When I click a subtask then click back, I have to navigate all the way back down to where I was, and I get lost in the subtasks, even if there are headings.

Thank you!

Welcome, @Kate_Lyons1,

I’ve merged your post into an existing topic where you can click the title to scroll to the top and vote by clicking the Vote button.

Here are potential workarounds, and some more earlier in this topic to consider:

Thanks,

Larry