diff options
author | W. Trevor King <wking@drexel.edu> | 2008-12-02 19:23:04 -0500 |
---|---|---|
committer | W. Trevor King <wking@drexel.edu> | 2008-12-02 19:23:04 -0500 |
commit | 57a55f2e33a54b81ab48af6ca8e82bb4dabc2265 (patch) | |
tree | 7a495262c96e41da298a3a386c30d01bcb2932fe | |
parent | 404a76f0d49e36b7cc475928d7d665a56d83cadb (diff) | |
download | bugseverywhere-57a55f2e33a54b81ab48af6ca8e82bb4dabc2265.tar.gz |
Added support for bug reporter field.
Closes e2f6514c-5f9f-4734-a537-daf3fbe7e9a0
-rw-r--r-- | .be/bugs/e2f6514c-5f9f-4734-a537-daf3fbe7e9a0/values | 2 | ||||
-rw-r--r-- | becommands/new.py | 6 | ||||
-rw-r--r-- | libbe/bug.py | 1 |
3 files changed, 8 insertions, 1 deletions
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]) |