Added more possible bug statuses
authorAaron Bentley <abentley@panoramicfeedback.com>
Wed, 25 Jan 2006 22:00:13 +0000 (17:00 -0500)
committerAaron Bentley <abentley@panoramicfeedback.com>
Wed, 25 Jan 2006 22:00:13 +0000 (17:00 -0500)
beweb/beweb/templates/edit_bug.kid
libbe/bugdir.py

index 57f1940ad1db097a789697dc6f564735b36203ea..89c42085a8b95e7eb132a4d8e478aa27374763f6 100644 (file)
@@ -1,6 +1,6 @@
 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
 <?python
-from libbe.bugdir import severity_levels
+from libbe.bugdir import severity_levels, active_status, inactive_status
 from libbe.utility import time_to_str 
 from beweb.controllers import bug_list_url, comment_url
 from beweb.config import people
@@ -41,7 +41,7 @@ def select_among(name, options, default, display_names=None):
 <form method="post">
 <table>
 <tr><td>Status</td><td>Severity</td><td>Assigned To</td><td>Summary</td></tr>
-<tr><td>${select_among("status", ["open", "closed", "in-progress"], bug.status)}</td><td>${select_among("severity", severity_levels, bug.severity)}</td>
+<tr><td>${select_among("status", active_status+inactive_status, bug.status)}</td><td>${select_among("severity", severity_levels, bug.severity)}</td>
 <td>${select_among("assigned", people.keys()+[None], bug.assigned, people)}</td><td><input name="summary" value="${bug.summary}" size="80" /></td></tr>
 </table>
 <div py:for="comment in bug.list_comments()" class="comment">
index 9fee68098195eec277b73882ef6ba0053aef6229..d30bc754fefcf92b583cf48723982df097598366 100644 (file)
@@ -210,13 +210,15 @@ def checked_property(name, valid):
     return property(getter, setter)
 
 severity_levels = ("wishlist", "minor", "serious", "critical", "fatal")
+active_status = ("open", "in-progress", "waiting", "new", "verified")
+inactive_status = ("closed", "disabled", "fixed", "wontfix", "waiting")
 
 severity_value = {}
 for i in range(len(severity_levels)):
     severity_value[severity_levels[i]] = i
 
 class Bug(object):
-    status = checked_property("status", (None, "open", "closed", "in-progress"))
+    status = checked_property("status", (None,)+active_status+inactive_status)
     severity = checked_property("severity", (None, "wishlist", "minor",
                                              "serious", "critical", "fatal"))
 
@@ -244,7 +246,7 @@ class Bug(object):
         return os.path.join(self.path, self.uuid, file)
 
     def _get_active(self):
-        return self.status in ("open", "in-progress")
+        return self.status in active_status
 
     active = property(_get_active)