findTeam(text="") doesn't find all teams

Bug #306844 reported by Markus Korn
2
Affects Status Importance Assigned to Milestone
Launchpad itself
Triaged
Low
Unassigned

Bug Description

I would like to use the API to get the number of teams registered in launchpad.
My idea was to use
  launchpad.people.findTeam(text="")._wadl_resource.representation["total_size"]
  (actually len(launchpad.people.findTeam(text="")) but this is a known bug in launchpadlib)
this returns a number of about 1030 teams on staging and edge
However the statistics box on https://edge.launchpad.net/people says that there are about 4000 teams registered in launchpad. The huge difference seems to indicate that either the number on the webpage or the number returned by the API is wrong.

Revision history for this message
Guilherme Salgado (salgado) wrote :

If given an empty string, findTeam() will return only the teams which have one or more email addresses.

It should return all teams, just like findPerson() does when it's given an empty string.

Note, though, that the docstring of findTeam() doesn't say it will return all teams if given an empty string.

Changed in launchpad:
status: New → Triaged
Curtis Hovey (sinzui)
Changed in launchpad-registry:
importance: Undecided → Low
William Grant (wgrant)
summary: - number of teams return by a findTeam API call seems to be wrong
+ findTeam(text="") doesn't find all teams
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.