-
-
Notifications
You must be signed in to change notification settings - Fork 322
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Improper elision in budget reports when using tree view #2071
Comments
) Parent accounts with no actual or goal amounts would ideally be shown elided on the same line, but the budget report in tree mode was omitting them completely. Now --budget always shows them. The effect is much like forcing --no-elide on, except it might not show goal amounts that --no-elide does show. It's not a wonderful fix, but the budget report code is twisty and I can't afford to spend more time on this.
I found this hard to debug and hard to fix. I have pushed a best effort fix which essentially forces --no-elide when doing bal --budget --tree. Boring parent accounts won't get elided on the same line as their subaccount as they should, but at least they are not omitted causing wrong reports. Any testing / improvements welcome. |
I see this regressed in hledger 1.23 in 2021. @williamcpierce, claim your http://hledger.org/REGRESSIONS.html#regression-bounty when convenient. 1.22 and earlier behaved like the latest fix, ie, forcing each displayed account to have its own line. |
…monmichael#2071) Parent accounts with no actual or goal amounts would ideally be shown elided on the same line, but the budget report in tree mode was omitting them completely. Now --budget always shows them. The effect is much like forcing --no-elide on, except it might not show goal amounts that --no-elide does show. It's not a wonderful fix, but the budget report code is twisty and I can't afford to spend more time on this.
Submitted, thank you! |
Version
hledger 1.30, mac-aarch64
Reproduction
For this journal file:
Running
hledger bal -p "2023-08" --budget
prints the following, as expected:But if you add the -t (tree) flag to the same command, you instead get:
Which is missing the "gifts" account, making it appear as if "cash" is a subaccount of "employment."
Workaround
Changing the month of the mock transaction to 08 or 09 resolves the issue in this particular example, as does deleting the whole transaction.
Adding --no-elide fixes this issue generally.
Discussion
https://matrix.to/#/!GYlETOAdUBSCcvnEMY:matrix.org/$Fm32JSJs50xGcn4l1v-m5vLz6HQlSr4V4hVg38_0tRw?via=matrix.org&via=vanpetegem.me
Notes from @simonmichael
"IIRC the budget report hides accounts with no budget goals by default, and that is not handled well in this tree report"
"adding --no-elide works around it"
The text was updated successfully, but these errors were encountered: