aboutsummaryrefslogtreecommitdiffstats
path: root/libbe/command/new.py
diff options
context:
space:
mode:
authorW. Trevor King <wking@drexel.edu>2010-01-21 12:24:45 -0500
committerW. Trevor King <wking@drexel.edu>2010-01-21 12:24:45 -0500
commit98dc89a994db1c5b77db786498a4b3783edb325c (patch)
tree6265d088664286c3c7c224170a8ff6e733cffb16 /libbe/command/new.py
parentf0d54fa01b024f740cd421e8de95b2a9a6c29a13 (diff)
downloadbugseverywhere-98dc89a994db1c5b77db786498a4b3783edb325c.tar.gz
Use _get_user_id() in New, remove unused 'user-id' prop. from Commit.
Added creator field to bugs without creator information. Mostly this is due to the recent lack of creator-setting in `be new`.
Diffstat (limited to 'libbe/command/new.py')
-rw-r--r--libbe/command/new.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/libbe/command/new.py b/libbe/command/new.py
index ac0659b..be18306 100644
--- a/libbe/command/new.py
+++ b/libbe/command/new.py
@@ -38,6 +38,7 @@ class New (libbe.command.Command):
>>> uuid_gen = libbe.util.id.uuid_gen
>>> libbe.util.id.uuid_gen = lambda: 'X'
+ >>> ui._user_id = u'Fran\\xe7ois'
>>> ret = ui.run(cmd, args=['this is a test',])
Created bug with ID abc/X
>>> libbe.util.id.uuid_gen = uuid_gen
@@ -45,6 +46,10 @@ class New (libbe.command.Command):
>>> bug = bd.bug_from_uuid('X')
>>> print bug.summary
this is a test
+ >>> bug.creator
+ u'Fran\\xe7ois'
+ >>> bug.reporter
+ u'Fran\\xe7ois'
>>> bug.time <= int(time.time())
True
>>> print bug.severity
@@ -80,6 +85,7 @@ 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['reporter'] != None:
bug.reporter = params['reporter']
else: