On Mon, Mar 19, 2012 at 11:37 PM, Guilherme Salgado <guilherme.salg...@linaro.org> wrote:
> (This is for ProductSeries tasks; need similar for DistroSeries) > if productseries is not None and product is None: > if (productseries.id == productseries.product.development_focusID > and task.status not in BugTask._NON_CONJOINED_STATUSES): > continue > > The above would skip the master tasks in a conjoined relationship, > leaving the slave in the list returned to the page, but it would not > cause extra queries since I fetch the product/productseries as well. I'd > like to know if that's reasonable or if there's a better way (which > doesn't involve rewriting bug searching in LP ;) to achieve what I want? This approach seems preferable to issuing multiple queries. Worst case seems to be you throw away half the rows, but normally nowhere near that. > Oh, and I have the same kind of problem to filter out private bugs, but > I'm hoping there the extra queries issued when filtering them out in > python are not too big a deal because there shouldn't be many private > bugs in that page (for the vast majority of teams, at least) and the > checks to decide whether or not to show a private bug should consist > mostly of inTeam() calls, which are cached. I'm going to write some > tests to check how many extra queries that would incur (assuming I fetch > the bug's owner as well), but I'd like to know if you guys think it's > possible we can afford that sort of thing? Bug privacy is currently being overhauled. Hopefully you can exclude the private bugs in your initial query without much pain. -- Stuart Bishop <stuart.bis...@canonical.com> _______________________________________________ Mailing list: https://launchpad.net/~launchpad-dev Post to : launchpad-dev@lists.launchpad.net Unsubscribe : https://launchpad.net/~launchpad-dev More help : https://help.launchpad.net/ListHelp