diff options
author | W. Trevor King <wking@drexel.edu> | 2011-04-16 13:26:04 -0400 |
---|---|---|
committer | W. Trevor King <wking@drexel.edu> | 2011-04-16 13:26:04 -0400 |
commit | 4531a4ee54aa082ebc0c73982afb122d42c8d3d1 (patch) | |
tree | 634058b8991c70d46234a4b5ce310924f309e513 /libbe | |
parent | 6c0e1f3d3b3a9f56297cb721daa7431222d5ef25 (diff) | |
parent | be713557650c789b31a7d9a7525ea5a4e37f26d8 (diff) | |
download | bugseverywhere-4531a4ee54aa082ebc0c73982afb122d42c8d3d1.tar.gz |
Merge remote branch 'cooper/master'
Diffstat (limited to 'libbe')
-rw-r--r-- | libbe/command/new.py | 21 |
1 files changed, 20 insertions, 1 deletions
diff --git a/libbe/command/new.py b/libbe/command/new.py index 7dfbed8..849eafb 100644 --- a/libbe/command/new.py +++ b/libbe/command/new.py @@ -78,6 +78,16 @@ class New (libbe.command.Command): arg=libbe.command.Argument( name='assigned', metavar='NAME', completion_callback=libbe.command.util.complete_assigned)), + libbe.command.Option(name='status', short_name='t', + help='The bug\'s status level', + arg=libbe.command.Argument( + name='status', metavar='STATUS', + completion_callback=libbe.command.util.complete_status)), + libbe.command.Option(name='severity', short_name='s', + help='The bug\'s severity', + arg=libbe.command.Argument( + name='severity', metavar='SEVERITY', + completion_callback=libbe.command.util.complete_severity)), ]) self.args.extend([ libbe.command.Argument(name='summary', metavar='SUMMARY') @@ -99,7 +109,16 @@ 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: + bug.severity = params['severity'] print >> self.stdout, 'Created bug with ID %s' % bug.id.user() return 0 |