Skip to content

imp: pivot: Tag name shadowing field name takes precedence (#2169) #2418

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

savanto
Copy link
Contributor

@savanto savanto commented Jun 30, 2025

Please see #2169 for the rationale behind this change.


Tags shadowing field names (eg. payee) take precedence during pivoting. For example, before this change,

2025-01-01 CustA
    asset       $100    ; payee:CustA
    asset       $200    ; payee:CustB
    revenue

we expect bal asset --pivot=payee to produce:

                $300  CustA
--------------------
                $300

But after this change, we expect:

                $100  CustA
                $200  CustB
--------------------
                $300

More specific tags take precedence over less specific tags (ie. posting tags take precedence over transaction tags):

2025-01-01 CustA  ; payee:CustB
    asset       $100    ; payee:CustA
    asset       $200    ; payee:CustB
    revenue

still results in

                $100  CustA
                $200  CustB
--------------------
                $300

…ael#2169)

Tags shadowing field names (eg. `payee`) take precedence during
pivoting. For example, before this change,
```
2025-01-01 CustA
    asset       $100    ; payee:CustA
    asset       $200    ; payee:CustB
    revenue
```
we expect `bal asset --pivot=payee` to produce:
```
                $300  CustA
--------------------
                $300
```

But after this change, we expect:
```
                $100  CustA
                $200  CustB
--------------------
                $300
```

More specific tags take precedence over less specific tags
(ie. posting tags take precedence over transaction tags):

```
2025-01-01 CustA  ; payee:CustB
    asset       $100    ; payee:CustA
    asset       $200    ; payee:CustB
    revenue
```
still results in
```
                $100  CustA
                $200  CustB
--------------------
                $300
```
@simonmichael
Copy link
Owner

Comments added on #2169.

@simonmichael simonmichael added A-WISH Some kind of improvement request or proposal. journal The journal file format, and its features. needs-value-proposition To unblock: needs clearer justification, review of benefits vs costs needs-impact-analysis To unblock: needs analysis of interactions with other features, users, ecosystem needs-design To unblock: needs more thought/planning, leading to a spec/plan docs Documentation-related. needs-docs To unblock: needs corresponding documentation or doc updates and removed docs Documentation-related. labels Jul 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-WISH Some kind of improvement request or proposal. journal The journal file format, and its features. needs-design To unblock: needs more thought/planning, leading to a spec/plan needs-docs To unblock: needs corresponding documentation or doc updates needs-impact-analysis To unblock: needs analysis of interactions with other features, users, ecosystem needs-value-proposition To unblock: needs clearer justification, review of benefits vs costs
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants