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

feat(database): Improve statistics query #404

Merged
merged 1 commit into from
Jan 19, 2025
Merged

Conversation

jovandeginste
Copy link
Owner

This commit improves the statistics query to handle the since parameter more gracefully.

The query only adds a date filter if the since parameter is not "forever". This change ensures that the statistics are calculated correctly for all time periods. Additionally, the translation for "forever" has been added to support this new functionality. Finally, the since options in the UI have been updated to allow selection of "forever".

This commit improves the statistics query to handle the `since` parameter more
gracefully.

The query only adds a date filter if the `since` parameter is not
"forever". This change ensures that the statistics are calculated correctly for
all time periods. Additionally, the translation for "forever" has been added to
support this new functionality. Finally, the `since` options in the UI have been
updated to allow selection of "forever".

Signed-off-by: Jo Vandeginste <[email protected]>
@jovandeginste jovandeginste merged commit 7d685b4 into master Jan 19, 2025
3 checks passed
@jovandeginste jovandeginste deleted the allow-forever branch January 19, 2025 19:32
@TheBig-O
Copy link

TheBig-O commented Feb 1, 2025

When I select the "forever" option, the UI returns a blank window.
The querystring shows: https://workouts.org/workouts?active=true&type=&since=forever&order_by=date&order_dir=desc

If I change it to https://workouts.org/workouts?active=true&type=&since=all&order_by=date&order_dir=desc, it works as expected and returns all workouts.
It seems like the first querystring isn't registering as expected.

@jovandeginste
Copy link
Owner Author

Which version or release are you using? The current code in master checks for forever...

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.

2 participants