Bug 706 - fix budget-sync's incorrect assumption that at most 1 payment exists for each person-bug combination
Summary: fix budget-sync's incorrect assumption that at most 1 payment exists for each...
Status: RESOLVED FIXED
Alias: None
Product: Libre-SOC Organisation
Classification: Unclassified
Component: Planning (show other bugs)
Version: unspecified
Hardware: Other Linux
: Highest critical
Assignee: Jacob Lifshay
URL:
Depends on:
Blocks:
 
Reported: 2021-09-23 20:38 BST by Jacob Lifshay
Modified: 2021-09-24 08:03 BST (History)
3 users (show)

See Also:
NLnet milestone: ---
total budget (EUR) for completion of task and all subtasks: 0
budget (EUR) for this task, excluding subtasks' budget: 0
parent task for budget allocation:
child tasks for budget allocation:
The table of payments (in EUR) for this task; TOML format:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jacob Lifshay 2021-09-23 20:38:05 BST
this causes every bug that pays both "lkcl" and "donated" to only retain one of those payments in the generated csv file column for lkcl

full list as of writing:
Budget assigned to multiple aliases of the same person in a single task: bug #335, budget assigned to both 'lkcl' and 'donated'
Budget assigned to multiple aliases of the same person in a single task: bug #331, budget assigned to both 'lkcl' and 'donated'
Budget assigned to multiple aliases of the same person in a single task: bug #330, budget assigned to both 'lkcl' and 'donated'
Budget assigned to multiple aliases of the same person in a single task: bug #186, budget assigned to both 'lkcl' and 'donated'
Budget assigned to multiple aliases of the same person in a single task: bug #314, budget assigned to both 'lkcl' and 'donated'
Budget assigned to multiple aliases of the same person in a single task: bug #313, budget assigned to both 'lkcl' and 'donated'
Budget assigned to multiple aliases of the same person in a single task: bug #305, budget assigned to both 'lkcl' and 'donated'

example: bug #335: lkcl is paid 300 through "lkcl" alias, 100 through "donated" alias.
csv for Formal milestone has 400 total for bug, but only 100 in the lkcl column

attempted fix (splits out "donated" alias into separate "Luke Kenneth Casson Leighton (donated)" person):
https://git.libre-soc.org/?p=utils.git;a=commitdiff;h=a41c7d2522c9a7367b232c1adc069dd6aa8b3ad2

lkcl didn't like creating two budget-sync people for lkcl, so it was reverted:
https://git.libre-soc.org/?p=utils.git;a=commitdiff;h=2a7b0caa43c1c771fa0fdb425a35ac17a670942e
Comment 1 Jacob Lifshay 2021-09-24 08:03:43 BST
I ended up refactoring/rewriting a large portion of budget-sync, but now it should be able to handle multiple payments to a person in a bug (they do have to use different aliases otherwise the TOML parser will fail, since it is a dict at the level of TOML semantics).

https://git.libre-soc.org/?p=utils.git;a=commitdiff;h=d9408da49b5c87d9f3bafc0ab1ab41d33b608839

This should fix it.

I also added some more tests, and an extensible pretty-printer (I was trying to debug stuff and pprint wasn't good enough)