aboutsummaryrefslogtreecommitdiffstats
path: root/becommands/list.py
diff options
context:
space:
mode:
authorAaron Bentley <aaron.bentley@utoronto.ca>2005-03-19 07:53:03 +0000
committerAaron Bentley <aaron.bentley@utoronto.ca>2005-03-19 07:53:03 +0000
commitda5664e08b87e5ff479bd79e72ba9685f9cd7a4d (patch)
tree179d505d40ad5e1feb28cfe8336e360e17bcd85e /becommands/list.py
parent92826d47239312d7ed3cbc6638be44c6e84ca8a3 (diff)
downloadbugseverywhere-da5664e08b87e5ff479bd79e72ba9685f9cd7a4d.tar.gz
Implemented current target setting
Diffstat (limited to 'becommands/list.py')
-rw-r--r--becommands/list.py24
1 files changed, 23 insertions, 1 deletions
diff --git a/becommands/list.py b/becommands/list.py
index 0b27a25..d92ebac 100644
--- a/becommands/list.py
+++ b/becommands/list.py
@@ -4,6 +4,7 @@ import os
def execute(args):
active = True
severity = ("minor", "serious", "critical", "fatal")
+ tree = cmdutil.bug_tree()
def filter(bug):
if active is not None:
if bug.active != active:
@@ -11,16 +12,31 @@ def execute(args):
if bug.severity not in severity:
return False
return True
- all_bugs = list(cmdutil.bug_tree().list())
+ all_bugs = list(tree.list())
bugs = [b for b in all_bugs if filter(b) ]
if len(bugs) == 0:
print "No matching bugs found"
current_id = names.creator()
+ my_target_bugs = []
+ other_target_bugs = []
+ unassigned_target_bugs = []
my_bugs = []
other_bugs = []
unassigned_bugs = []
for bug in bugs:
+ if tree.target is not None and bug.target != tree.target:
+ continue
+ if bug.assigned == current_id:
+ my_target_bugs.append(bug)
+ elif bug.assigned is None:
+ unassigned_target_bugs.append(bug)
+ else:
+ other_target_bugs.append(bug)
+
+ for bug in bugs:
+ if tree.target is not None and bug.target == tree.target:
+ continue
if bug.assigned == current_id:
my_bugs.append(bug)
elif bug.assigned is None:
@@ -35,6 +51,12 @@ def execute(args):
for bug in cur_bugs:
print cmdutil.bug_summary(bug, all_bugs)
+ list_bugs(my_target_bugs,
+ "Bugs assigned to you for target %s" % tree.target)
+ list_bugs(unassigned_target_bugs,
+ "Unassigned bugs for target %s" % tree.target)
+ list_bugs(other_target_bugs,
+ "Bugs assigned to others for target %s" % tree.target)
list_bugs(my_bugs, "Bugs assigned to you")
list_bugs(unassigned_bugs, "Unassigned bugs")
list_bugs(other_bugs, "Bugs assigned to others")