alter layout to make it easier to distinguish things that have been paid
authorLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Wed, 28 Sep 2022 16:52:13 +0000 (17:52 +0100)
committerLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Wed, 28 Sep 2022 16:52:16 +0000 (17:52 +0100)
from those that still have to be submitted

budget-sync-config.toml
src/budget_sync/main.py

index c0576e4574425f783b0d846bdded9f640b08d545..33e0ce2f3be828c1d2ed6508966586887d7620d5 100644 (file)
@@ -98,7 +98,7 @@ aliases = ["jock"]
 full_name = "Jock Tanner"
 
 [people."veera"]
-email = "vklr@vkten.in"
+email = "veerakumar.r@gmail.com"
 aliases = ["vklr", "Veera Kumar", "Veera"]
 full_name = "R Veera Kumar"
 
index cdcc82edc8413e81d8428e1572855f5290cba1ea..b441acfbbd703224ac015263499125cdb710fd0c 100644 (file)
@@ -96,12 +96,29 @@ def print_budget_then_children(indent, nodes, bug_id):
     """
 
     bug = nodes[bug_id]
-    print("bug #%5d %s budget %6s excltasks %6s s %s p %s" %
+    b_incl = str(bug.fixed_budget_including_subtasks)
+    b_excl = str(bug.fixed_budget_excluding_subtasks)
+    s_incl = str(bug.submitted_including_subtasks)
+    p_incl = str(bug.paid_including_subtasks)
+    if b_incl == s_incl and b_incl == p_incl:
+        descr = "(s+p)"
+    elif b_incl == s_incl:
+        descr = "(s) p %s" % p_incl
+    elif b_incl == p_incl:
+        descr = "(p) s %s" % s_incl
+    elif s_incl == p_incl:
+        descr = " s,p  %s" % (p_incl)
+    else:
+        descr = "s %s p %s" % (s_incl, p_incl)
+    excl_desc = "               "
+    if b_incl != b_excl:
+        excl_desc = "excltasks %6s" % b_excl
+    print("bug #%5d %s budget %6s %s %s" %
           (bug.bug.id, ' |   ' * indent,
-           str(bug.fixed_budget_including_subtasks),
-           str(bug.fixed_budget_excluding_subtasks),
-           str(bug.submitted_including_subtasks),
-           str(bug.paid_including_subtasks)))
+           b_incl,
+           excl_desc,
+           descr
+           ))
     # print(repr(bug))
 
     for child in bug.immediate_children: