diff options
author | Aaron Bentley <abentley@panoramicfeedback.com> | 2005-03-18 14:02:01 +0000 |
---|---|---|
committer | Aaron Bentley <abentley@panoramicfeedback.com> | 2005-03-18 14:02:01 +0000 |
commit | 90e118fac5cfb345e10487039a375c8af5835ddf (patch) | |
tree | 8df25957b04e1a4dda7f81bbed2301c53bafb8b7 /becommands | |
parent | e0f027bc4d96afda56dcbf2ce3998a5bc9d88ff9 (diff) | |
download | bugseverywhere-90e118fac5cfb345e10487039a375c8af5835ddf.tar.gz |
Organized list by who the bugs are assigned to
Diffstat (limited to 'becommands')
-rw-r--r-- | becommands/list.py | 24 |
1 files changed, 22 insertions, 2 deletions
diff --git a/becommands/list.py b/becommands/list.py index d4b9142..e89195b 100644 --- a/becommands/list.py +++ b/becommands/list.py @@ -1,5 +1,5 @@ """List bugs""" -from libbe import bugdir, cmdutil +from libbe import bugdir, cmdutil, names import os def execute(args): active = True @@ -15,5 +15,25 @@ def execute(args): bugs = [b for b in all_bugs if filter(b) ] if len(bugs) == 0: print "No matching bugs found" + current_id = names.creator() + + my_bugs = [] + other_bugs = [] + unassigned_bugs = [] for bug in bugs: - print cmdutil.bug_summary(bug, all_bugs) + if bug.assigned == current_id: + my_bugs.append(bug) + elif bug.assigned is None: + unassigned_bugs.append(bug) + else: + other_bugs.append(bug) + + def list_bugs(cur_bugs, title): + if len(cur_bugs) > 0: + print cmdutil.underlined(title) + for bug in cur_bugs: + print cmdutil.bug_summary(bug, all_bugs) + + list_bugs(my_bugs, "Bugs assigned to you") + list_bugs(unassigned_bugs, "Unassigned bugs") + list_bugs(other_bugs, "Bugs assigned to others") |