]> piware.de Git - bin.git/blobdiff - workitems.py
workitems: fix typo
[bin.git] / workitems.py
index 2ff3114427dedc93e90079c94176a4d1742ec127..b2295a28fe742f0b9b9745334d62937b4bcc073d 100755 (executable)
@@ -47,7 +47,7 @@ def parse_argv():
     optparser.add_option('-t', '--text', action='store_true', default=False,
         help='Print work item summary in text format', dest='text')
     optparser.add_option('-c', '--csv', action='store_true', default=False,
-        help='Print work item summary in text format', dest='csv')
+        help='Print work item summary in CSV format', dest='csv')
     optparser.add_option('--from', metavar='YYYY-MM-DD',
         help='Generate CSV data from this day on', dest='from_date')
     optparser.add_option('--to', metavar='YYYY-MM-DD',
@@ -109,6 +109,10 @@ def get_blueprint_workitems(blueprint_url):
         state = state.strip().lower()
         if not state:
             state = 'todo'
+        if state == 'completed':
+            state = 'done'
+        if state == 'inprogress':
+            state = 'todo'
         if state not in valid_states:
             print >> sys.stderr, 'ERROR: invalid state "%s" for work item "%s"' % (
                 state, desc)
@@ -160,7 +164,7 @@ def add_work_item(db, blueprint, item, status):
 def import_lp(db, name_pattern, release):
     '''Collect blueprint work items from Launchpad into DB.'''
 
-    blueprints = get_blueprints('%s//ubuntu/%s/+specs' % (blueprints_base_url,
+    blueprints = get_blueprints('%s//ubuntu/%s/+specs?batch=300' % (blueprints_base_url,
         opts.release), name_pattern)
 
     cur = db.cursor()