Skip to content
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

Do not filter out non-Transaction entries #1969

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

Conversation

Evernight
Copy link

See #1623. The behaviour of filtering out non-Transaction entries along with Transaction ones is rather limiting at the moment. If advanced or account filters are specified, most of the times most of non-Transaction entries are filtered out from the ledger and at least for me this seemed counter-intuitive and potentially led to conclusions made on misleading data while browsing through various views on the ledger.

This is particularly prominent with the price entries when using multiple currencies in the ledger frequently and relying on automatic conversions. While using the popular https://github.com/andreasgerstmayr/fava-dashboards plugin or (for example) running BQL plugins from Fava that causes missing transactions (due to CONVERT(SUM(position), '{{currency}}', LAST(date)) not working).

As mentioned in the linked issue, I am not aware of any workaround to preserve (for example) price entries while applying filters to other transactions. One could imagine a filter option for entries like type:Price that you could add as an OR to the advanced filter (but not to the account filter), and it would be one way to address the problem. But then I'd need to add it to most of the queries I do since it would personally make sense for me all of the time. In any slice of my data there would be 2 or 3 different currencies that I'd need to convert to a common basis to do meaningful analysis.

These below are also a few statements that I believe to make sense, although of course I may miss some details and counter-arguments.

  1. Preserving non-Transaction entries while applying filters to Transactions would not cause unexpected behaviour in overwhelming majority of the cases.
  2. Filtering non-Transaction entries is not much needed in practice while working with the ledger. At least in my almost 2-year experience I haven't faced a practical case that required it.
  3. Filtering by time for non-Transaction entries still may make sense, although I'm not sure and don't have a particular opinion about this. I still can't think of practical cases and maybe for consistency that would need to be changed as well.

Hence, I suggest this pull request as a RFC. I tested it locally for some time and it works better than the Fava's current behaviour for my personal needs at least. I'm able to set and interlink more useful dashboards for a personal ledger.

The tests have been adjusted accordingly. I had to remove 4 checks related to an open directive properties. If they were based on any practical use-case, would be happy to return / make adjustments that make sense.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant