Added support for bug reporter field.
authorW. Trevor King <wking@drexel.edu>
Wed, 3 Dec 2008 00:23:04 +0000 (19:23 -0500)
committerW. Trevor King <wking@drexel.edu>
Wed, 3 Dec 2008 00:23:04 +0000 (19:23 -0500)
Closes e2f6514c-5f9f-4734-a537-daf3fbe7e9a0

.be/bugs/e2f6514c-5f9f-4734-a537-daf3fbe7e9a0/values
becommands/new.py
libbe/bug.py

index ac013c5240969793bf0cc704c22a1d3313204482..608b460d0e554c11dc905e13c81ab1db12c04120 100644 (file)
@@ -15,7 +15,7 @@ severity=minor
 
 
 
-status=open
+status=fixed
 
 
 
index 69ff5b893ff08f419f6c9a421b3819dd42fae973..dec40cb25030c6b928a3fd4e81c2473967abf16d 100644 (file)
@@ -45,11 +45,17 @@ def execute(args, test=False):
         raise cmdutil.UsageError("Please supply a summary message")
     bd = bugdir.BugDir(from_disk=True, manipulate_encodings=not test)
     bug = bd.new_bug(summary=args[0])
+    if options.reporter != None:
+        bug.reporter = options.reporter
+    else:
+        bug.reporter = bug.creator
     bd.save()
     print "Created bug with ID %s" % bd.bug_shortname(bug)
 
 def get_parser():
     parser = cmdutil.CmdOptionParser("be new SUMMARY")
+    parser.add_option("-r", "--reporter", metavar="REPORTER", dest="reporter",
+                      help="The user who reported the bug", default=None)
     return parser
 
 longhelp="""
index cba06d63ce060c263060d82fdbf0b639b07997be..14f3db0785d25a025c55283dbe1b2bdb7dcd469f 100644 (file)
@@ -227,6 +227,7 @@ class Bug(settings_object.SavedSettingsObject):
                     ("Status", self.status),
                     ("Assigned", self._setting_attr_string("assigned")),
                     ("Target", self._setting_attr_string("target")),
+                    ("Reporter", self._setting_attr_string("reporter")),
                     ("Creator", self._setting_attr_string("creator")),
                     ("Created", timestring)]
             longest_key_len = max([len(k) for k,v in info])