diff options
author | wking <wking@thialfi> | 2010-06-22 11:10:00 -0400 |
---|---|---|
committer | wking <wking@thialfi> | 2010-06-22 11:10:00 -0400 |
commit | a4ec8a0c99b2a918fa8a5ae1cab36652d2d9c83e (patch) | |
tree | 7c39621ea2625991dd44af8ee941407f8f069d2e /libbe/command/new.py | |
parent | 2d757a30f5c29d87ce5ebc4311b15f9c4fc6c4b4 (diff) | |
download | bugseverywhere-a4ec8a0c99b2a918fa8a5ae1cab36652d2d9c83e.tar.gz |
Added -c/--creator to `be new`
Following Gour's suggestion on the mailing list.
Diffstat (limited to 'libbe/command/new.py')
-rw-r--r-- | libbe/command/new.py | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/libbe/command/new.py b/libbe/command/new.py index be18306..a2982a8 100644 --- a/libbe/command/new.py +++ b/libbe/command/new.py @@ -68,6 +68,10 @@ class New (libbe.command.Command): help='The user who reported the bug', arg=libbe.command.Argument( name='reporter', metavar='NAME')), + libbe.command.Option(name='creator', short_name='c', + help='The user who created the bug', + arg=libbe.command.Argument( + name='creator', metavar='NAME')), libbe.command.Option(name='assigned', short_name='a', help='The developer in charge of the bug', arg=libbe.command.Argument( @@ -85,7 +89,10 @@ class New (libbe.command.Command): summary = params['summary'] bugdir = self._get_bugdir() bug = bugdir.new_bug(summary=summary.strip()) - bug.creator = self._get_user_id() + if params['creator'] != None: + bug.creator = params['creator'] + else: + bug.creator = self._get_user_id() if params['reporter'] != None: bug.reporter = params['reporter'] else: |