From: Aaron Bentley Date: Mon, 2 Jan 2006 20:53:32 +0000 (-0500) Subject: Added assignment of bugs to people to web UI X-Git-Tag: 1.0.0~236 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=74df8a9003736ca76dee3b94433edd4e9e04dbc3;p=be.git Added assignment of bugs to people to web UI --- diff --git a/beweb/beweb/controllers.py b/beweb/beweb/controllers.py index b0f13db..cbd0816 100644 --- a/beweb/beweb/controllers.py +++ b/beweb/beweb/controllers.py @@ -84,10 +84,14 @@ class Bug(PrestHandler): raise cherrypy.HTTPRedirect(bug_url(bug_data['project'], bug.uuid)) @provide_action("action", "Update") - def update(self, bug_data, bug, status, severity, summary, action): + def update(self, bug_data, bug, status, severity, summary, assigned, + action): bug.status = status bug.severity = severity bug.summary = summary + if assigned == "": + assigned = None + bug.assigned = assigned bug.save() raise cherrypy.HTTPRedirect(bug_list_url(bug_data["project"])) diff --git a/beweb/beweb/templates/bugs.kid b/beweb/beweb/templates/bugs.kid index b8b2ff7..07d8dee 100644 --- a/beweb/beweb/templates/bugs.kid +++ b/beweb/beweb/templates/bugs.kid @@ -2,6 +2,7 @@ Bug list for ${project_name} -
+
IDStatusSeverityAssigned ToSummary
${unique_name(bug, bugs[:])}${bug.status}${bug.severity}${bug.assigned}${bug.summary}
${unique_name(bug, bugs[:])}${bug.status}${bug.severity}${people.get(bug.assigned, bug.assigned)}${bug.summary}
Project list diff --git a/beweb/beweb/templates/edit_bug.kid b/beweb/beweb/templates/edit_bug.kid index 49dbe52..57f1940 100644 --- a/beweb/beweb/templates/edit_bug.kid +++ b/beweb/beweb/templates/edit_bug.kid @@ -3,14 +3,28 @@ from libbe.bugdir import severity_levels from libbe.utility import time_to_str from beweb.controllers import bug_list_url, comment_url -def select_among(name, options, default): +from beweb.config import people +def select_among(name, options, default, display_names=None): output = ['") return XML("".join(output)) ?> @@ -27,7 +41,8 @@ def select_among(name, options, default):
- + +
StatusSeverityAssigned ToSummary
${select_among("status", ["open", "closed", "in-progress"], bug.status)}${select_among("severity", severity_levels, bug.severity)}${bug.assigned}
${select_among("status", ["open", "closed", "in-progress"], bug.status)}${select_among("severity", severity_levels, bug.severity)}${select_among("assigned", people.keys()+[None], bug.assigned, people)}