Getting Teams in UI order


#1

@Joe_Trollo @Jeff_Schneider

Hi guys,

When I query for projects in a team, I get them back in the correct order matching how the user has set them in the UI. (And of course tasks come back in the correct order when you query them.)

However, when I query for teams in an organization, the order doesn’t match the UI. It looks like they come back in ascending ID order.

Any chance we can get teams returned in the user’s defined UI order like we get with projects and tasks?


#2

Hmm, that’s an interesting observation. It seems like we should take the ordering into account for this endpoint, but we don’t. I’ve added this request to our API bugs backlog project for the team to evaluate and I’ll let you know if there is any particular reason that the implementation doesn’t maintain the ordering.


#3

Ah, @Joe_Trollo points out that getting the teams in an organization through the API will return all of the teams in the organization, not just the ones that the current user is a member of. In Asana only the teams that the user is a member of are displayed in the sidebar, so these are actually two different things.

I’m curious if you can provide more detail about what you’re building; are you looking to get these teams in the same order as the user sees them in order to re-create how the information is displayed in Asana?


#4

Well THAT’S interesting! Hmmm, I’m going to have to decide what to do in my app. Currently I’m displaying all teams returned in the API, not realizing that’s likely a superset of what the Asana UI displays. Although, the ordering issue will still exist…

Exactly, I am indeed! What I’ve built is Treesana - see the web page for detail (with more to come).