Get Task Progress (%) from Portfolios

Hi, is it possible to extract the Task Progress % value from Portfolios? Thanks.

Welcome to the Asana Community Forum :wave:

If you refer to task % completed within a project you can definitely see this in Portfolios or you can for example set up graphs under reports within a project or you can also use Asana Goals.

For status on individual tasks see:

Welcome, @jmramos,

No, I don’t believe so. Or perhaps @Phil_Seeman knows an undocumented way?

__
Previously, I answered mistakenly assuming the question was about a Goal’s current metric percent progress, but I’ll leave that here as well:

The right-side “Response” scrolling area shows:

"metric": {
      "gid": "12345",
      "resource_type": "task",
      "currency_code": "EUR",
      "current_display_value": "8.12",
      "current_number_value": 8.12,
      "initial_number_value": 5.2,
      "precision": 2,
      "resource_subtype": "number",
      "target_number_value": 10.2,
      "unit": "none"
    },

which is for the Number type but I imagine percent would appear here for that metric type.

Hope that helps,

Larry

2 Likes

Can you elaborate? The question was about portfolios, but you reference goals.

Welcome, @anon54538255,

Whoops, you’re right; I had misinterpreted the question; sorry. I just updated my answer, so have a look now.

Thanks,

Larry

Thanks! I’ve started to question my sanity for a moment.

Let me add some details. I’m looking for a way to provide a chopped own presentation of the portfolio tab for an internal resource: portfolio selector that displays a list of projects for selected portfolio along with % of tasks completed.

My current idea is https://developers.asana.com/:
1: /docs/get-multiple-portfolios for current user
2: /docs/get-portfolio-items for selected portfolio (default - 1st)
3: /docs/get-task-count-of-a-project for each project in the selected portfolio.

Unfortunately, this results in a lot of api calls:
1: 1 call on load
2: 1 call on portfolio select
3: 1 per each project in the portfolio.

So, selecting a portfolio with 10 project will result in 10 requests just to get those counts + 1 for portfolio itself and 1 to list portfolios.

Considering, that Request 3 is considered a high cost request, I don’t see how this approach will scale, considering that I’m pretty much locked in using Service Accounts due to requirements. This means that rate limiting will be my downfall.

Any suggestions? In the end, Asana does render this in UI by default, so there should be a way to query that data via API, no? Maybe some field expansion that is not listed in the docs or something?

PS: sorry about the links, forum rules prevent from pasting more than 2.

@anon54538255,

Let me loop in @Phil_Seeman or @Frederic_Malenfant who could provide a better answer than I could. Maybe caching results could help, but would be more work.

But related, I actually created an alternative view that has a bit of what you’re considering, so perhaps you’d be interested to check it out for ideas (though not exactly the same, so I’m not recommending it instead):

Larry

I haven’t done much API work with portfolios but @anon54538255, the architecture you outline sounds right to me. I can’t see any shortcuts.

Have you tried it yet? I could certainly be wrong but I think you may be overly worried about performance/cost/limiting. If I were you, I would try it before assuming it’s going to be too non-performant. (Unless you already have!) It may be, I just wouldn’t assume so out of hand. :wink:

The only alternative architecture I can think of is what @lpb already mentioned, but it’s orders of magnitude more complex: you could store the data in your own data store, and combine that with webhooks to get notified when data changes in Asana (or use the Events API and periodically query for changes if you don’t want to set up and maintain webhooks) and update your data based on those events. Then you can use your data as the source for the display.

No, sorry. The Asana product itself doesn’t use the API, and the API doesn’t currently have feature parity with the web product (the DevRel team is pushing in that direction, but that’ll happen over time).

2 Likes

Thanks for responses, guys.

@lpb , that’s aboutish the widget that we are supposed to do, but we can’t force the users to manually input percentages, since that defeats the purpose of a tool and enforces a contract upon them.

@Phil_Seeman No, I haven’t tried it yet. Maybe you are right and I’m overly worried, but we do have a number of users, so it’s not without merit. But oh well. Guess there’s no other way, but try. :slight_smile:

Thanks again folks.

2 Likes