From: Luke Kenneth Casson Leighton Date: Wed, 28 Sep 2022 16:52:13 +0000 (+0100) Subject: alter layout to make it easier to distinguish things that have been paid X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=74dd61e6c1c6984fbb18c730bacd5b377139eca2;p=utils.git alter layout to make it easier to distinguish things that have been paid from those that still have to be submitted --- diff --git a/budget-sync-config.toml b/budget-sync-config.toml index c0576e4..33e0ce2 100644 --- a/budget-sync-config.toml +++ b/budget-sync-config.toml @@ -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" diff --git a/src/budget_sync/main.py b/src/budget_sync/main.py index cdcc82e..b441acf 100644 --- a/src/budget_sync/main.py +++ b/src/budget_sync/main.py @@ -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: