From: wking Date: Tue, 22 Jun 2010 15:10:00 +0000 (-0400) Subject: Added -c/--creator to `be new` X-Git-Tag: 1.0.0~58^2~1 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=a4ec8a0c99b2a918fa8a5ae1cab36652d2d9c83e;p=be.git Added -c/--creator to `be new` Following Gour's suggestion on the mailing list. --- 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: