launchpad-dev team mailing list archive
-
launchpad-dev team
-
Mailing list archive
-
Message #09163
Re: Filtering out conjoined/private bugs in python with no extra DB queries
On 21/03/12 09:50, Guilherme Salgado wrote:
> On 21/03/12 06:40, Robert Collins wrote:
>> On Tue, Mar 20, 2012 at 5:37 AM, Guilherme Salgado
>> <guilherme.salgado@xxxxxxxxxx> wrote:
>>> Hi there,
>>>
>>> In order to implement https://dev.launchpad.net/Projects/WorkItems we
>>> have a query for BugTasks that returns all tasks assigned to any member
>>> of a team and whose milestone has a due date before a certain cutoff
>>> date. AFAICT, I cannot use BugTaskSet.search() for that because there
>>> we cannot search for tasks assigned to any members of a team or across
>>> all tasks with milestones (we can only filter by a single milestone or
>>> not filter by milestone at all). Adding support for those two things
>>
>> !citation needed.
>>
>> Did you try passing in any(*yourinterestedmilestones) ? The advanced
>> search form quite happily selects a set of milestones today....
>
> Oh, indeed, I didn't realize I could do that. And it looks like I can
> do the same with the assignee.
Except it crashes if you pass any(*milestones) *and*
exclude_conjoined_tasks=True because _build_exclude_conjoined_clause()
assumes params.milestone is a single IMilestone instance. And fixing
_build_exclude_conjoined_clause() seems to involve doing up to 3 joins
for every milestone passed in, which sounds scary to me.
--
Guilherme Salgado <https://launchpad.net/~salgado>
Attachment:
signature.asc
Description: OpenPGP digital signature
Follow ups
References