Fixed launchpad import bugs.

This patch accomodates for searchTasks()'s default behavior of
only reading open bugs. Note that we already have a switch for
converting those statuses, we just have never used it.

Change-Id: I71ffaeac4bce3a57f080a9ccdc423f8affd4fde2
This commit is contained in:
Michael Krotscheck
2014-11-10 10:12:37 -08:00
parent 600c07ec20
commit 6544a3d3f8
2 changed files with 7 additions and 3 deletions

View File

@@ -83,8 +83,8 @@ def map_lp_status(lp_status):
if lp_status in ('Unknown', 'New', 'Confirmed', 'Triaged'):
return 'todo'
elif lp_status in (
'Incomplete', 'Opinion', 'Invalid', "Won't Fix",
'Expired'):
"Incomplete (with response)", "Incomplete (without response)",
"Opinion", "Invalid", "Won't Fix", "Expired"):
return 'invalid'
elif lp_status == 'In Progress':
return 'inprogress'

View File

@@ -25,7 +25,11 @@ class LaunchpadReader(object):
'production')
self.project_name = project_name
self.project = self.lp.projects[project_name]
self.tasks = self.project.searchTasks()
self.tasks = self.project.searchTasks(
status=["New", "Incomplete (with response)",
"Incomplete (without response)", "Invalid", "Won't Fix",
"Confirmed", "Triaged", "Opinion", "Expired",
"In Progress", "Fix Committed", "Fix Released"])
self.task_iterator = self.tasks.__iter__()
def __iter__(self):