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

fix: #3079 Add date filtering util to outflow-over-time #3149

Merged
merged 1 commit into from Jul 12, 2023

Conversation

kevinwpeters17
Copy link
Contributor

@kevinwpeters17 kevinwpeters17 commented Jun 17, 2023

GitHub Issue (if applicable): #3079

In the current state, the Outflow Over Time report does not appropriately filter transactions by the date ranges.
image
In the above screenshot, notice the date range is only for June 2023 - June 2023 so only transactions from June 2023 or (2023-06 in the legend) should appear in the graph. However, all month/year combinations from the accounts' history show up.

Trello Link (if applicable):

Explanation of Bugfix/Feature/Modification:
I added a new function filterTransactionsByDate that filters the passed transactions with the from and to dates available in the filters context: filters.dateFilter. I also added a few small comments to contextualize variables.

This now properly shows only the transactions that exist within the date range for the selected accounts. Here is the current month:
image

Sample of the latest three months:
image

Sample of this year:
image

As a random note, thank you to @simonjohansson for building this out in the first place! And for all the maintainers of this project.

@kevinwpeters17 kevinwpeters17 marked this pull request as ready for review June 17, 2023 21:57
@joshmadewell
Copy link
Member

joshmadewell commented Jul 12, 2023

looks good, thank you! also thank you for the nice words :D

@joshmadewell joshmadewell merged commit 0917fb6 into toolkit-for-ynab:main Jul 12, 2023
1 of 2 checks passed
@simonjohansson
Copy link
Contributor

Awesome work @kevinwpeters17 💯

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.

None yet

3 participants