aboutsummaryrefslogtreecommitdiffstats
path: root/cfbe.py
diff options
context:
space:
mode:
authorSteve Losh <steve@stevelosh.com>2009-01-30 23:53:09 -0500
committerSteve Losh <steve@stevelosh.com>2009-01-30 23:53:09 -0500
commit120720baf3ce09aacaddb82c0937af596aea62fe (patch)
treeb65903b7b98883114b72efda855aebec6f51d19c /cfbe.py
parent012817b8ed9c47354fe3b1e7657b82bcda4e77a4 (diff)
downloadbugseverywhere-120720baf3ce09aacaddb82c0937af596aea62fe.tar.gz
Implemented the status filter.
Diffstat (limited to 'cfbe.py')
-rwxr-xr-xcfbe.py18
1 files changed, 17 insertions, 1 deletions
diff --git a/cfbe.py b/cfbe.py
index 7e2db0e..4509bf1 100755
--- a/cfbe.py
+++ b/cfbe.py
@@ -16,7 +16,7 @@ class WebInterface:
"""The web interface to CFBE."""
@cherrypy.expose
- def index(self, status='open', assignee=''):
+ def index(self, status='open', assignee='', target=''):
bd.load_all_bugs()
if status == 'open':
@@ -25,18 +25,28 @@ class WebInterface:
elif status == 'closed':
status = ['closed', 'disabled', 'fixed', 'wontfix']
label = 'All Closed Bugs'
+
if assignee != '':
if assignee == 'None':
label += ' Currently Unassigned'
else:
label += ' Assigned to %s' % (assignee,)
+ if target != '':
+ if target == 'None':
+ label += ' Currently Unschdeuled'
+ else:
+ label += ' Scheduled for %s' % (target,)
+
template = env.get_template('list.html')
possible_assignees = list(set([bug.assigned for bug in bd if bug.assigned != None]))
possible_assignees.sort(key=unicode.lower)
+ possible_targets = list(set([bug.target for bug in bd if bug.target != None]))
+ possible_targets.sort(key=unicode.lower)
+
bugs = [bug for bug in bd if bug.status in status]
if assignee != '':
@@ -44,8 +54,14 @@ class WebInterface:
assignee = None
bugs = [bug for bug in bugs if bug.assigned == assignee]
+ if target != '':
+ if target == 'None':
+ target = None
+ bugs = [bug for bug in bugs if bug.target == target]
+
return template.render(bugs=bugs, bd=bd, label=label,
assignees=possible_assignees,
+ targets=possible_targets,
repository_name=repository_name)