From 72f9263f3d812fb817e0bc4f5c7d07b60df2cd6c Mon Sep 17 00:00:00 2001 From: "W. Trevor King" Date: Thu, 4 Dec 2008 12:40:39 -0500 Subject: [PATCH] Added per-tree default assignee option. The new setting is currently only used when creating new bugs with becommand/new. --- .../0d8af004-8352-4254-b747-d96a40a5d457/body | 1 + .../values | 8 +++++ .../values | 31 +++---------------- .../be64734c-d9a8-4f6d-83eb-e9b6c9adc0bf/body | 3 ++ .../values | 8 +++++ .../values | 25 +++------------ becommands/new.py | 6 ++++ libbe/bugdir.py | 7 ++++- 8 files changed, 41 insertions(+), 48 deletions(-) create mode 100644 .be/bugs/301724b1-3853-4aff-8f23-44373df7cf1c/comments/0d8af004-8352-4254-b747-d96a40a5d457/body create mode 100644 .be/bugs/301724b1-3853-4aff-8f23-44373df7cf1c/comments/0d8af004-8352-4254-b747-d96a40a5d457/values create mode 100644 .be/bugs/68ba7f0c-ca5f-4f49-a508-e39150c07e13/comments/be64734c-d9a8-4f6d-83eb-e9b6c9adc0bf/body create mode 100644 .be/bugs/68ba7f0c-ca5f-4f49-a508-e39150c07e13/comments/be64734c-d9a8-4f6d-83eb-e9b6c9adc0bf/values diff --git a/.be/bugs/301724b1-3853-4aff-8f23-44373df7cf1c/comments/0d8af004-8352-4254-b747-d96a40a5d457/body b/.be/bugs/301724b1-3853-4aff-8f23-44373df7cf1c/comments/0d8af004-8352-4254-b747-d96a40a5d457/body new file mode 100644 index 0000000..708159c --- /dev/null +++ b/.be/bugs/301724b1-3853-4aff-8f23-44373df7cf1c/comments/0d8af004-8352-4254-b747-d96a40a5d457/body @@ -0,0 +1 @@ +Implemented diff --git a/.be/bugs/301724b1-3853-4aff-8f23-44373df7cf1c/comments/0d8af004-8352-4254-b747-d96a40a5d457/values b/.be/bugs/301724b1-3853-4aff-8f23-44373df7cf1c/comments/0d8af004-8352-4254-b747-d96a40a5d457/values new file mode 100644 index 0000000..6e9546e --- /dev/null +++ b/.be/bugs/301724b1-3853-4aff-8f23-44373df7cf1c/comments/0d8af004-8352-4254-b747-d96a40a5d457/values @@ -0,0 +1,8 @@ +Content-type: text/plain + + +Date: Thu, 04 Dec 2008 17:40:08 +0000 + + +From: W. Trevor King + diff --git a/.be/bugs/301724b1-3853-4aff-8f23-44373df7cf1c/values b/.be/bugs/301724b1-3853-4aff-8f23-44373df7cf1c/values index 9485ae7..8704a7e 100644 --- a/.be/bugs/301724b1-3853-4aff-8f23-44373df7cf1c/values +++ b/.be/bugs/301724b1-3853-4aff-8f23-44373df7cf1c/values @@ -1,35 +1,14 @@ +assigned: abentley +creator: abentley -assigned=abentley +severity: minor +status: fixed - -creator=abentley - - - - - - -severity=minor - - - - - - -status=open - - - - - - -summary=Per-tree configuration: default-assigneed? - - +summary: 'Per-tree configuration: default-assigneed?' diff --git a/.be/bugs/68ba7f0c-ca5f-4f49-a508-e39150c07e13/comments/be64734c-d9a8-4f6d-83eb-e9b6c9adc0bf/body b/.be/bugs/68ba7f0c-ca5f-4f49-a508-e39150c07e13/comments/be64734c-d9a8-4f6d-83eb-e9b6c9adc0bf/body new file mode 100644 index 0000000..dd464bf --- /dev/null +++ b/.be/bugs/68ba7f0c-ca5f-4f49-a508-e39150c07e13/comments/be64734c-d9a8-4f6d-83eb-e9b6c9adc0bf/body @@ -0,0 +1,3 @@ +Per-tree severity and target are now supported. + +I'm not sure what Aaron meant be "BE ids". diff --git a/.be/bugs/68ba7f0c-ca5f-4f49-a508-e39150c07e13/comments/be64734c-d9a8-4f6d-83eb-e9b6c9adc0bf/values b/.be/bugs/68ba7f0c-ca5f-4f49-a508-e39150c07e13/comments/be64734c-d9a8-4f6d-83eb-e9b6c9adc0bf/values new file mode 100644 index 0000000..84da235 --- /dev/null +++ b/.be/bugs/68ba7f0c-ca5f-4f49-a508-e39150c07e13/comments/be64734c-d9a8-4f6d-83eb-e9b6c9adc0bf/values @@ -0,0 +1,8 @@ +Content-type: text/plain + + +Date: Thu, 04 Dec 2008 17:29:30 +0000 + + +From: W. Trevor King + diff --git a/.be/bugs/68ba7f0c-ca5f-4f49-a508-e39150c07e13/values b/.be/bugs/68ba7f0c-ca5f-4f49-a508-e39150c07e13/values index a9e974e..b8e8291 100644 --- a/.be/bugs/68ba7f0c-ca5f-4f49-a508-e39150c07e13/values +++ b/.be/bugs/68ba7f0c-ca5f-4f49-a508-e39150c07e13/values @@ -1,28 +1,11 @@ +creator: abentley +severity: wishlist -creator=abentley +status: closed - - - -severity=wishlist - - - - - - -status=open - - - - - - -summary=Support per-tree settings for severity, target, BE ids - - +summary: Support per-tree settings for severity, target, BE ids diff --git a/becommands/new.py b/becommands/new.py index 15ee4a9..1c5246c 100644 --- a/becommands/new.py +++ b/becommands/new.py @@ -49,6 +49,10 @@ def execute(args, test=False): bug.reporter = options.reporter else: bug.reporter = bug.creator + if options.assigned != None: + bug.assigned = options.assigned + elif bd.default_assignee != settings_object.EMPTY: + bug.assigned = bd.default_assignee bd.save() print "Created bug with ID %s" % bd.bug_shortname(bug) @@ -56,6 +60,8 @@ 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) + parser.add_option("-a", "--assigned", metavar="ASSIGNED", dest="assigned", + help="The developer in charge of the bug", default=None) return parser longhelp=""" diff --git a/libbe/bugdir.py b/libbe/bugdir.py index 443dfc5..98110dd 100644 --- a/libbe/bugdir.py +++ b/libbe/bugdir.py @@ -170,12 +170,17 @@ class BugDir (list, settings_object.SavedSettingsObject): @_versioned_property(name="user_id", doc= -"""The user's prefered name, e.g 'John Doe '. Note +"""The user's prefered name, e.g. 'John Doe '. Note that the Arch RCS backend *enforces* ids with this format.""", change_hook=_set_user_id, generator=_guess_user_id) def user_id(): return {} + @_versioned_property(name="default_assignee", + doc= +"""The default assignee for new bugs e.g. 'John Doe '.""") + def default_assignee(): return {} + @_versioned_property(name="rcs_name", doc="""The name of the current RCS. Kept seperate to make saving/loading settings easy. Don't set this attribute. Set .rcs instead, and -- 2.26.2