Added per-tree default assignee option.
authorW. Trevor King <wking@drexel.edu>
Thu, 4 Dec 2008 17:40:39 +0000 (12:40 -0500)
committerW. Trevor King <wking@drexel.edu>
Thu, 4 Dec 2008 17:40:39 +0000 (12:40 -0500)
The new setting is currently only used when creating new bugs with
becommand/new.

.be/bugs/301724b1-3853-4aff-8f23-44373df7cf1c/comments/0d8af004-8352-4254-b747-d96a40a5d457/body [new file with mode: 0644]
.be/bugs/301724b1-3853-4aff-8f23-44373df7cf1c/comments/0d8af004-8352-4254-b747-d96a40a5d457/values [new file with mode: 0644]
.be/bugs/301724b1-3853-4aff-8f23-44373df7cf1c/values
.be/bugs/68ba7f0c-ca5f-4f49-a508-e39150c07e13/comments/be64734c-d9a8-4f6d-83eb-e9b6c9adc0bf/body [new file with mode: 0644]
.be/bugs/68ba7f0c-ca5f-4f49-a508-e39150c07e13/comments/be64734c-d9a8-4f6d-83eb-e9b6c9adc0bf/values [new file with mode: 0644]
.be/bugs/68ba7f0c-ca5f-4f49-a508-e39150c07e13/values
becommands/new.py
libbe/bugdir.py

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 (file)
index 0000000..708159c
--- /dev/null
@@ -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 (file)
index 0000000..6e9546e
--- /dev/null
@@ -0,0 +1,8 @@
+Content-type: text/plain
+
+
+Date: Thu, 04 Dec 2008 17:40:08 +0000
+
+
+From: W. Trevor King <wking@drexel.edu>
+
index 9485ae7d7e8773e9a6edd944e8db31d6bc613e1e..8704a7ec5af1c22446268bbc77074fc8c11edfa5 100644 (file)
@@ -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 (file)
index 0000000..dd464bf
--- /dev/null
@@ -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 (file)
index 0000000..84da235
--- /dev/null
@@ -0,0 +1,8 @@
+Content-type: text/plain
+
+
+Date: Thu, 04 Dec 2008 17:29:30 +0000
+
+
+From: W. Trevor King <wking@drexel.edu>
+
index a9e974e48368faf95a78344a69841ecdcb9fe1f7..b8e8291302f677b973f018ded69f078cbd734869 100644 (file)
@@ -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
 
index 15ee4a90f8052f3939f884b8163f10a7f0b62fd1..1c5246c59f75a740a41a4e0fab0e83727bfbf112 100644 (file)
@@ -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="""
index 443dfc5bbd6e3587d7bbddc63a1fea28a82babfe..98110dd477ffc3dd4da47400f42e2097396ad4aa 100644 (file)
@@ -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 <jdoe@example.com>'.  Note
+"""The user's prefered name, e.g. 'John Doe <jdoe@example.com>'.  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 <jdoe@example.com>'.""")
+    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