← Back to team overview

launchpad-dev team mailing list archive

Re: bug api questions

 

Hi, Martin.

On Wed, Jan 26, 2011 at 11:06 PM, 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?
>

As Markus notes, using searchTasks on the person is the way to get this.

> 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?
>

It's not there because there is no attribute on a person for assigned
bugs.  The list of assigned bugs is generated by a view, which really
just hooks around searchTasks the same as you have to do with the API.
 The API is hooked to our model code, not view code, which is why this
is left out.  To expose this in the API, you would need create such an
attribute for a person and then export it.

Hope that helps.

Cheers,
deryck

-- 
Deryck Hodge
https://launchpad.net/~deryck
http://www.devurandom.org/



Follow ups

References