Launchpad lib gives wrong results when searching tasks with a given status

Bug #928863 reported by Ara Pulido
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
launchpadlib
Triaged
Low
Unassigned

Bug Description

I was trying to use launchpadlib to search for all bugs (with a certain status) with tags "blocks-hwcert" and "precise" in Ubuntu.

This is what I did:

First, without status:

ubuntu = launchpad.distributions['ubuntu']
tasks = ubuntu.searchTasks(tags=['precise', 'blocks-hwcert'], tags_combinator="All")

for task in tasks:
   ....: print task.bug

https://api.launchpad.net/1.0/bugs/830949
https://api.launchpad.net/1.0/bugs/888219
https://api.launchpad.net/1.0/bugs/834731
https://api.launchpad.net/1.0/bugs/926136

print tasks[3].status
Incomplete

Then with status:

search_status = ["New","Incomplete","Confirmed","Triaged","In Progress","Fix Committed"]

tasks = ubuntu.searchTasks(tags=['precise', 'blocks-hwcert'], tags_combinator="All")

for task in tasks:
   ....: print task.bug

https://api.launchpad.net/1.0/bugs/830949
https://api.launchpad.net/1.0/bugs/888219
https://api.launchpad.net/1.0/bugs/834731

========== Expected results ==================

The Incomplete tasks also show in the second query, as Incomplete was explicitly marked for the search

Revision history for this message
Aaron Bentley (abentley) wrote :

Can't reproduce this. Note that tasks[3] is currently 'Confirmed'. Perhaps its status changed while testing.

>>> ubuntu = lp.distributions['ubuntu']
>>> tasks = ubuntu.searchTasks(tags=['precise', 'blocks-hwcert'], tags_combinator="All")
>>> for task in tasks:
... print task.bug
...
https://api.launchpad.net/devel/bugs/830949
https://api.launchpad.net/devel/bugs/888219
https://api.launchpad.net/devel/bugs/834731
https://api.launchpad.net/devel/bugs/926136
>>> print tasks[3].status
Confirmed
>>> search_status = ["New","Incomplete","Confirmed","Triaged","In Progress","Fix Committed"]
>>>
>>> tasks2 = ubuntu.searchTasks(tags=['precise', 'blocks-hwcert'], tags_combinator="All")
>>> for task in tasks2:
... print task.bug
...
https://api.launchpad.net/devel/bugs/830949
https://api.launchpad.net/devel/bugs/888219
https://api.launchpad.net/devel/bugs/834731
https://api.launchpad.net/devel/bugs/926136

Changed in launchpadlib:
status: New → Incomplete
Revision history for this message
Robert Collins (lifeless) wrote : Re: [Bug 928863] Re: Launchpad lib gives wrong results when searching tasks with a given status

fwiw this is a dup of a server side bug - launchpadlib isn't doing
anything wrong here.

Revision history for this message
Abel Deuring (adeuring) wrote :

I can reproduce it. As a workaround, you can use

    ubuntu.searchTasks(status=['Incomplete (with response)', 'Incomplete (without response)'])

Changed in launchpadlib:
status: Incomplete → Confirmed
importance: Undecided → Low
Abel Deuring (adeuring)
Changed in launchpadlib:
status: Confirmed → Triaged
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.