Comment 2 for bug 320596

Revision history for this message
Markus Korn (thekorn) wrote :

Now that I've access to the code, I understand what's going wrong here. The omit_targeted search parameter of the searchTasks() method defaults to `True`, which makes sense for searchTasks() in general but not for searchTasks() on distro series, because we explicitly query for a target here. This default behavior results in a SQL statement like

[...] BugTask.distroseries = 3 AND [...] AND BugTask.distroseries is NULL AND BugTask.productseries is NULL [...]

which of course always returns an empty result.

I would be more than happy to help to fix this, if somebody could show me the best way to change the default value distro series objects only. Or is it not a bug in launchpad, but in the client (launchpadlib) which has to take care of sensible default values?
The attachment lists the SQL statements for the web UI and API calls, maybe the API statement could also be changed to be as simple as the web one by changing the default value of the status parameter.