-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
Limit date ranges that end far in the future #22592
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sgiehl
added
c: Usability
For issues that let users achieve a defined goal more effectively or efficiently.
c: Dates & Calendar
For bugs and features in date range selections, calendar UI, and report frequency.
labels
Sep 16, 2024
sgiehl
force-pushed
the
disallowfuturedates
branch
2 times, most recently
from
September 16, 2024 16:41
007a431
to
a72d66c
Compare
sgiehl
force-pushed
the
disallowfuturedates
branch
from
September 18, 2024 14:47
a72d66c
to
707cc29
Compare
mneudert
reviewed
Sep 24, 2024
Co-authored-by: Marc Neudert <marc@innocraft.com>
mneudert
approved these changes
Sep 24, 2024
michalkleiner
approved these changes
Sep 24, 2024
sgiehl
added a commit
that referenced
this pull request
Sep 25, 2024
* Limit the end date of range periods to 10 years in the future * Mark method as api * Apply review feedback Co-authored-by: Marc Neudert <marc@innocraft.com> --------- Co-authored-by: Michal Kleiner <michal@innocraft.com> Co-authored-by: Marc Neudert <marc@innocraft.com>
11 tasks
sgiehl
added a commit
that referenced
this pull request
Sep 25, 2024
* Limit the end date of range periods to 10 years in the future * Mark method as api * Apply review feedback --------- Co-authored-by: Michal Kleiner <michal@innocraft.com> Co-authored-by: Marc Neudert <marc@innocraft.com> Co-authored-by: caddoo <matthew.caddoo@gmail.com>
jorgeuos
pushed a commit
to jorgeuos/matomo
that referenced
this pull request
Oct 1, 2024
* Limit the end date of range periods to 10 years in the future * Mark method as api * Apply review feedback Co-authored-by: Marc Neudert <marc@innocraft.com> --------- Co-authored-by: Michal Kleiner <michal@innocraft.com> Co-authored-by: Marc Neudert <marc@innocraft.com>
sgiehl
added a commit
that referenced
this pull request
Oct 10, 2024
* Limit the end date of range periods to 10 years in the future * Mark method as api * Apply review feedback Co-authored-by: Marc Neudert <marc@innocraft.com> --------- Co-authored-by: Michal Kleiner <michal@innocraft.com> Co-authored-by: Marc Neudert <marc@innocraft.com>
11 tasks
mneudert
added a commit
that referenced
this pull request
Oct 10, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
c: Dates & Calendar
For bugs and features in date range selections, calendar UI, and report frequency.
c: Usability
For issues that let users achieve a defined goal more effectively or efficiently.
Needs Review
PRs that need a code review
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description:
Matomo currently only restricts provided dates in the past. A date currently can't be set to earlier than August 1991 - the date were the first website went live.
Future dates are currently not restricted, even though it doesn't make sense to provide dates that are far in the future. As Matomo won't archive future dates, there can't be any data returned anyway.
Providing single periods like
day
,week
,month
oryear
far in the future is unproblematic, as Matomo would simply display no data for it.Range periods and multiple period requests however are a bit different, as Matomo would try to process all subperiods that are included. As dates in the future can't have any data anyway, there is not much value in even trying to process those dates unlimited.
Therefor this PR introduces an internal limit for range periods. If a range is provided with an end date that is more than 10 years in the future, Matomo will automatically cut down the range to end at end of the current year + 10 years.
Review