Skip to content

balance -E (and hledger-ui Z) not showing zero parent accounts (1.19-1.22) #1688

Closed

Description

@simonmichael

I'm not sure if there's another explanation, but I'm puzzled enough to note it as a possible bug:

$ hledger-1.18 -f avodonosov.journal  bal revenues -N -E --no-elide
           200.0 BYN  revenues
           200.0 BYN    forex gain
           200.0 BYN      unrealised
$ hledger -f avodonosov.journal  bal revenues -N -E --no-elide
           200.0 BYN  revenues:forex gain:unrealised

With any hledger version >1.18, I'm unable to show the two zero-balance parent accounts here. I expected that -E, certainly when combined with --no-elide, would show them and their 0 balance as separate line items.

Activity

  1. added
    A-BUGSomething wrong, confusing or sub-standard in the software, docs, or user experience.
    uiThe hledger-ui tool.
    on Sep 8, 2021
  2. simonmichael commented on Sep 8, 2021

    @simonmichael
    MemberAuthor

    Repro:

    1/1
        (a)        1
        (a:b)      1
    
    1/2
        (a)       -1
        (a:b)     -1
    
    $ hledger-1.18 -f b.j bal -E --no-elide
                       0  a
                       0    b
    --------------------
                       0
    $ hledger-1.19 -f b.j bal -E --no-elide
                       0  a:b
    --------------------
                       0
    

    It seems --no-elide's original function broke (a long time ago! [well, a year ago]). Perhaps with that fixed things will make more sense.

  3. Xitian9 commented on Sep 8, 2021

    @Xitian9
    Collaborator

    I think between 1.18 and 1.19 we switched from --tree as default to --flat as default. Can you check if hledger-1.19 -f b.j bal -E --no-elide --tree does what you want?

  4. simonmichael commented on Sep 8, 2021

    @simonmichael
    MemberAuthor

    @Xitian9, ah good point. Yes that works; you remind me that --no-elide does that thing only in tree mode.

    Maybe my problem is with -E ? Or I could still be confused. See:

    $ hledger-1.18 -f b.j bal --flat
    --------------------
                       0
    $ hledger-1.18 -f b.j bal --flat -E
                       0  a
                       0  a:b
    --------------------
                       0
    $ hledger-1.19 -f b.j bal --flat
    --------------------
                       0
    $ hledger-1.19 -f b.j bal --flat -E
                       0  a:b
    --------------------
                       0
    

    All in list mode here. I expected the -E flag to reveal both the a and a:b accounts.

  5. Xitian9 commented on Sep 9, 2021

    @Xitian9
    Collaborator

    Indeed, it looks like -E will only show empty leaves, and not empty branches. This is probably reasonable behaviour for tree mode, but not for flat mode. Should I update this and add some new tests?

    https://github.com/simonmichael/hledger/blob/4cb631c0f2de99a609bfa6c25b0c3de1bd07bc71/hledger-lib/Hledger/Reports/MultiBalanceReport.hs#L410-L414

  6. simonmichael commented on Sep 9, 2021

    @simonmichael
    MemberAuthor

    That would be great, thanks.

  7. changed the title [-]bal --no-elide (and -E, and hledger-ui zero display ?) not working as I expected[/-] [+]balance -E (and hledger-ui Z) not showing zero parent accounts (1.19-1.22)[/+] on Sep 21, 2021
  8. added
    regressionA backwards step, indicating a weakness in our QA. We don't like these.
    on Sep 21, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-BUGSomething wrong, confusing or sub-standard in the software, docs, or user experience.balanceregressionA backwards step, indicating a weakness in our QA. We don't like these.uiThe hledger-ui tool.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions