add list of not-submitted bugs
authorLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Thu, 16 Jun 2022 16:49:28 +0000 (17:49 +0100)
committerLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Thu, 16 Jun 2022 16:49:28 +0000 (17:49 +0100)
src/budget_sync/budget_graph.py
src/budget_sync/main.py

index 483f36ec2db89bc9e6fa3e0b9a02668f374b17e6..de1bed8c7f9d88f7e70fb97c5bb0cd0eb2ae89ee 100644 (file)
@@ -235,6 +235,7 @@ class PaymentSummary:
         self.total_submitted = Money(0)
         self.submitted_date = None
         self.paid_date = None
+        self.not_submitted = []
         summary_state = None
         for payment in self.payments:
             if summary_state is None:
@@ -255,11 +256,15 @@ class PaymentSummary:
                 self.total_paid += payment.amount
             else:
                 assert payment.state is PayeeState.NotYetSubmitted
+                self.not_submitted.append(payment.node.bug.id)
         if summary_state is None:
             self.state = PaymentSummaryState.NotYetSubmitted
         else:
             self.state = summary_state
 
+    def get_not_submitted(self):
+        return self.not_submitted
+
     def __repr__(self) -> str:
         return (f"PaymentSummary(total={self.total}, "
                 f"total_paid={self.total_paid}, "
index 6d587a2d44abd766898c6ce1d943a86655401980..b4c35c93e44f17e8be88a5ab49b31ec24fb84a61 100644 (file)
@@ -71,6 +71,9 @@ def summarize_milestones(budget_graph: BudgetGraph):
         print(f"{milestone.identifier}")
         print(f"\t{summary.total} submitted: "
               f"{summary.total_submitted} paid: {summary.total_paid}")
+        not_submitted = summary.get_not_submitted()
+        if not_submitted:
+            print ("not submitted", not_submitted)
 
         # and one to display people
         for person in budget_graph.milestone_people[milestone]: