should tags override a previous value of the same tag ?

17 views
Skip to first unread message

Simon Michael

unread,
Jan 10, 2023, 11:48:13 PM1/10/23
to hledger
Hi all.. 

Currently tags always accumulate; you can't override tag values. Eg if you set tag foo:A on a transaction and tag foo:B on its posting, the posting ends up with two values of the foo tag (foo:A, foo:B).

https://github.com/simonmichael/hledger/issues/1950 and pull request https://github.com/simonmichael/hledger/pull/1955 are proposing to change this, so that the same tag would overwrite a previous value of that tag. (The posting would end up with just one value of the foo tag, foo:B). There are some use case examples on the issue.

There is the idea of adding special syntax to allow either behaviour, but that sounds too complicated to me.

Switching to overriding tag values sounds alright to me, but I expect it might break some existing journals and workflows. And there might be awkward consequences we haven't seen yet. 

If you use tags in your journals, could you have a think about how this change would affect you, and/or let us know your opinion on the proposed change ? Thanks!

niels...@gmail.com

unread,
Jan 16, 2023, 11:58:08 AM1/16/23
to hledger
In my tag use, there would be no problem in overriding tag values. 

As I think about it for the first time, overriding values makes sense logically. 

Rob 

Reply all
Reply to author
Forward
0 new messages