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

Display notification about not yet processed data also when visits log is disabled #22178

Merged
merged 14 commits into from May 8, 2024

Conversation

sgiehl
Copy link
Member

@sgiehl sgiehl commented May 2, 2024

Description:

When viewing data for a period that includes today, we are currently displaying a notification if no archive data is available yet, but there has been raw data tracked already.

OnlyRawDataNotification_show_notification_when_only_raw_data_exists

This currently does not work when the visits log is disabled in config or only for the current site, as we are checking for raw data availability using the API method Live.getLastVisitsDetails. But this one is disabled when the visits log is not available.

To be able to show a similar notification when there has been raw data tracked, but the visits log is disabled, this PR introduces a new API method Live.getMostRecentVisitsDateTime, which simply returns the last actions date time that happened (in a certain period).

The check for raw data availability has been switched to use the new API method in favor of Live.getLastVisitsDetails. Same was applied to the check done on the no data page.

In case the visits log is disabled, no archives have been built yet, but raw data was tracked this notification will be shown:

OnlyRawDataNotification_show_notification_when_only_raw_data_exists_no_visits_log

fixes #19736

Review

@sgiehl sgiehl added Enhancement For new feature suggestions that enhance Matomo's capabilities or add a new report, new API etc. Regression Indicates a feature used to work in a certain way but it no longer does even though it should. labels May 2, 2024
@sgiehl sgiehl added this to the 5.1.0 milestone May 2, 2024
@sgiehl sgiehl added the Needs Review PRs that need a code review label May 2, 2024
@sgiehl sgiehl requested a review from a team May 2, 2024 12:51
plugins/Live/API.php Outdated Show resolved Hide resolved
@michalkleiner
Copy link
Contributor

Was just passing by so left a few code comments, I didn't functionally check this.

sgiehl and others added 3 commits May 8, 2024 09:15
Co-authored-by: Michal Kleiner <michal@innocraft.com>
Co-authored-by: Michal Kleiner <michal@innocraft.com>
@sgiehl sgiehl merged commit 3887e88 into 5.x-dev May 8, 2024
21 of 25 checks passed
@sgiehl sgiehl deleted the dev-13877 branch May 8, 2024 16:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Enhancement For new feature suggestions that enhance Matomo's capabilities or add a new report, new API etc. Needs Review PRs that need a code review Regression Indicates a feature used to work in a certain way but it no longer does even though it should.
Projects
None yet
3 participants