From: W. Trevor King Date: Wed, 3 Dec 2008 00:23:04 +0000 (-0500) Subject: Added support for bug reporter field. X-Git-Tag: 1.0.0~93 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=57a55f2e33a54b81ab48af6ca8e82bb4dabc2265;p=be.git Added support for bug reporter field. Closes e2f6514c-5f9f-4734-a537-daf3fbe7e9a0 --- diff --git a/.be/bugs/e2f6514c-5f9f-4734-a537-daf3fbe7e9a0/values b/.be/bugs/e2f6514c-5f9f-4734-a537-daf3fbe7e9a0/values index ac013c5..608b460 100644 --- a/.be/bugs/e2f6514c-5f9f-4734-a537-daf3fbe7e9a0/values +++ b/.be/bugs/e2f6514c-5f9f-4734-a537-daf3fbe7e9a0/values @@ -15,7 +15,7 @@ severity=minor -status=open +status=fixed diff --git a/becommands/new.py b/becommands/new.py index 69ff5b8..dec40cb 100644 --- a/becommands/new.py +++ b/becommands/new.py @@ -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=""" diff --git a/libbe/bug.py b/libbe/bug.py index cba06d6..14f3db0 100644 --- a/libbe/bug.py +++ b/libbe/bug.py @@ -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])