Add support for 'none' and '-' with --assigned like in `be assign`
authorAndrew Cooper <andrew.cooper@hkcreations.org>
Tue, 29 Mar 2011 18:52:52 +0000 (13:52 -0500)
committerAndrew Cooper <andrew.cooper@hkcreations.org>
Tue, 29 Mar 2011 18:52:52 +0000 (13:52 -0500)
libbe/command/new.py

index 7a5c51d9f6b0de08097d0bcad56a6094f7a41d64..849eafb9502231a8749f53dfc1f9dd63ed56cf80 100644 (file)
@@ -109,7 +109,12 @@ class New (libbe.command.Command):
         else:
             bug.reporter = bug.creator
         if params['assigned'] != None:
-            bug.assigned = params['assigned']
+            assigned = params['assigned']
+            if assigned == 'none':
+                assigned = None
+            elif assigned == '-':
+                assigned = self._get_user_id()
+            bug.assigned = assigned
         if params['status'] != None:
             bug.status = params['status']
         if params['severity'] != None: