Tag task based on who commented last

I’m getting ready to write a script that will take a given task, look at its stories (comments), look at who posted last to the comment, and create a tag of a certain color based on whether the user is a member of the development team or not. My current questions are:

  • is it possible to sort by date so that I can get only the most recent story?
  • is there an easy way to identify the poster as a member of our development team or not?

Cheers!

Welcome to the community!

I’d say you need to get all the stories and order them yourself Build an app with Asana

I am surprised to not find an endpoint to get a user team. Maybe you need to get all the teams and find out yourself Build an app with Asana

@Phil_Seeman @lpb @Diakoptis any idea?

Hi @Paul_Clerc and thanks @Bastien_Siebman,

https://app.asana.com/api/1.0/users/me/teams?organization=:gid&opt_pretty

returns an array of objects for user “me” that include a name property which is the team name, so if one of them matches “Development” the user is a team member.

@Joe_Trollo, I think the API documentation is missing mention of the need for the parameter organization=:gid, right?

Thanks,
Larry

:champagne: thanks a lot Larry

1 Like

Thanks so much for the replies gents. Much appreciated!

Paul

1 Like