retval += payment.amount
return retval
+ @cached_property
+ def submitted_including_subtasks(self) -> Money:
+ retval = self.submitted_excluding_subtasks
+ for i in self.immediate_children:
+ retval += i.submitted_including_subtasks
+ return retval
+
+ @cached_property
+ def paid_including_subtasks(self) -> Money:
+ retval = self.paid_excluding_subtasks
+ for i in self.immediate_children:
+ retval += i.paid_including_subtasks
+ return retval
+
@property
def parent(self) -> Optional["Node"]:
if self.parent_id is not None:
"""
bug = nodes[bug_id]
- print("bug #%5d %s budget %7s excltasks %7s" %
+ print("bug #%5d %sbudget %5s excltasks %5s sub_tot %s paid_tot %s" %
(bug.bug.id, ' ' * (indent*4),
- str(bug.budget_including_subtasks),
- str(bug.budget_excluding_subtasks)))
- #print (repr(bug))
+ str(bug.fixed_budget_including_subtasks),
+ str(bug.fixed_budget_excluding_subtasks),
+ str(bug.submitted_including_subtasks),
+ str(bug.paid_including_subtasks)))
+
+ # print(repr(bug))
for child in bug.immediate_children:
if (str(child.budget_including_subtasks) == "0" and
str(child.budget_excluding_subtasks) == "0"):