From a4ec8a0c99b2a918fa8a5ae1cab36652d2d9c83e Mon Sep 17 00:00:00 2001 From: wking Date: Tue, 22 Jun 2010 11:10:00 -0400 Subject: Added -c/--creator to `be new` Following Gour's suggestion on the mailing list. --- libbe/command/new.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'libbe/command') 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: -- cgit