launchpad-dev team mailing list archive
-
launchpad-dev team
-
Mailing list archive
-
Message #06310
Re: bug api questions
On Thu, Jan 27, 2011 at 6:06 AM, Martin Pool <mbp@xxxxxxxxxxxxx> wrote:
> 1- How do I, through the API, get a list of all bugs assigned to a
> person, across all pillars?
I asked myself a similar question some time ago, and I came up with
this (kind of ugly) solution
In [16]: thekorn = launchpad.people["thekorn"]
In [17]: assigned_tasks = thekorn.searchTasks(assignee=thekorn)
In [18]: len(list(assigned_tasks))
Out[18]: 19
Which is consistent with https://bugs.edge.launchpad.net/~thekorn/+assignedbugs
>
> 2- It seems like it would be clean and consistent with other apis to
> have person.assigned_tasks_collection_link. Am I misunderstanding
> something about the API design that explains why it's not there, or is
> it just accidental? Would it be easy to add one?
>
> --
> Martin
>
> _______________________________________________
> Mailing list: https://launchpad.net/~launchpad-dev
> Post to : launchpad-dev@xxxxxxxxxxxxxxxxxxx
> Unsubscribe : https://launchpad.net/~launchpad-dev
> More help : https://help.launchpad.net/ListHelp
>
References