Allow transaction filtering by availableFrom
Closed this issue · 2 comments
Is your feature request related to a problem? Please describe.
I am looking for incoming transactions that make up the income of a specified month, for example "Show me all transactions that are counted as income for March 2024".
Describe the solution you'd like
Looking at the existing code I think the following could be a possible solution:
- Add a filter (probably two or three) for
availableFrom
inbackend/pkg/controllers/v4/transaction.go
Line 132 in 051aed3
- Similar to the
date
,fromDate
anduntilDate
filters we could exposeavailableFromDate
,availableFromFromDate
andavailableFromUntilDate
. The naming is not ideal but I don't have a better idea right now. But I hope it shows what I mean. - The filter should expose logic similar to
Line 63 in 051aed3
Describe alternatives you've considered
Currently, the only alternative is for the client application to fetch all incoming transactions (up to the month of interest) from the API and then filter them based on their availableFrom
field. Processing this in the backend/database and only sending the result should be quicker (and easier to implement).
Additional context
None, let me know if anything is unclear.
Love the detail in this issue. Made it even easier to implement, thanks!
This is now available exactly as you proposed in v5.4.0
Nice, thanks!