Changed layout of the displaying bugs (list and show commands)
authorOleg Romanyshyn <oromanyshyn@panoramicfeedback.com>
Fri, 22 Apr 2005 16:59:54 +0000 (16:59 +0000)
committerOleg Romanyshyn <oromanyshyn@panoramicfeedback.com>
Fri, 22 Apr 2005 16:59:54 +0000 (16:59 +0000)
becommands/list.py
libbe/cmdutil.py

index 4b0fa1dd235fd59bf5d7eb2df8af304b9357fc43..9b3b40bf278499f3f652caf5c6203b84666318a5 100644 (file)
@@ -63,7 +63,7 @@ def execute(args):
         if len(cur_bugs) > 0:
             print cmdutil.underlined(title)
             for bug in cur_bugs:
-                print cmdutil.bug_summary(bug, all_bugs, no_target=no_target)
+                print cmdutil.bug_summary(bug, all_bugs, no_target=no_target, shortlist=True)
     
     list_bugs(my_target_bugs, 
               "Bugs assigned to you for target %s" % tree.target, 
index 31a542dcbbffd75e58ba3cf9f12b9ba3f849dd3e..b6a24873331cded9aaf2accae4231e5361646c1d 100644 (file)
@@ -44,7 +44,7 @@ def get_bug(spec, bug_dir=None):
         raise UserError("No bug matches %s" % spec)
     return matches[0]
 
-def bug_summary(bug, bugs, no_target=False):
+def bug_summary(bug, bugs, no_target=False, shortlist=False):
     target = bug.target
     if target is None or no_target:
         target = ""
@@ -54,9 +54,12 @@ def bug_summary(bug, bugs, no_target=False):
         assigned = ""
     else:
         assigned = "  Assigned: %s" % bug.assigned
-    return "ID: %s  Severity: %s%s%s  Creator: %s \n%s\n" % \
+    if shortlist == False:
+       return "  ID: %s\n  Severity: %s\n%s%s\n  Creator: %s \n%s\n" % \
             (unique_name(bug, bugs), bug.severity, assigned, target,
              bug.creator, bug.summary)
+    else:
+       return "%4s: %s\n" % (unique_name(bug, bugs), bug.summary)
 
 def iter_commands():
     for name, module in plugin.iter_plugins("becommands"):