-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Stats Traffic: Increase number of weeks to fetch for monthly chart #22826
Stats Traffic: Increase number of weeks to fetch for monthly chart #22826
Conversation
|
App Name | ![]() |
|
Configuration | Release-Alpha | |
Build Number | pr22826-1210657 | |
Version | 24.4 | |
Bundle ID | org.wordpress.alpha | |
Commit | 1210657 | |
App Center Build | WPiOS - One-Offs #9145 |
|
App Name | ![]() |
|
Configuration | Release-Alpha | |
Build Number | pr22826-1210657 | |
Version | 24.4 | |
Bundle ID | com.jetpack.alpha | |
Commit | 1210657 | |
App Center Build | jetpack-installable-builds #8189 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry for the delay reviewing this, @staskus.
I ran into some bugs which I'll detail below.
An error occurred
when viewing certain weeks
I thought it might be related to Oct having six calendar weeks, but it looks to be related to DST kicking in in my timezone on Oct 1st.
On the team P2 with the week of "Sep 25 - Oct 1, 2023" selected, the screen doesn't load and `An error occurred" is shown:
self.periodDataQueryDateFormatter.date(from: "2023-10-01")
returns nil
for me, which ends up being due to clocking moving forward one hour at that time. Adding df.timeZone = TimeZone(secondsFromGMT: 0)
seems to fix the issue.
This is unrelated to this PR, so not a blocker.
Zero counts display for month of Oct 2023
Oct 2023 also shows zeros for Views/Visitors/Likes/Comments for me:
I didn't have time to finish looking into this unfortunately, but it's reproducible without this change, so again not a blocker. I think it's likely the same issue we say in March 2024 (the one you raised in p1709296218622579-slack-C82FZ5T4G).
I think this PR is fine. I see the six bars in Oct 2023 now and the counts look correct. I think the above are existing, unrelated issues.
Certainly this is a bug that needs to be fixed. I wonder if it also happens to users that see these "An error occurred errors"
This workaround should've resolved issues such as these. #22750 Although that workaround by itself needs to be improved #22750 (comment) which I haven't done. |
I don't think this is related to the "An error occurred" errors I saw in #12945 (comment), which was for this month (not Oct 2023).
I think it might be best to start looking into the backend. I didn't follow up on this over the last few weeks because it seemed low-priority, but it's happened in Oct 2023 and Feb 2024 IIRC. |
More context: p1709642938683799/1709576037.356079-slack-C06BR07TJHK
Long months, such as October 2023 have 6 weeks that fall into one month's range. We should fetch 6 weeks to make sure they are included in the charts. View Model makes sure that the weeks that don't belong to a given month are not shown in a chart.
To test:
Regression Notes
Couldn't identify any
What I did to test those areas of impact (or what existing automated tests I relied on)
What automated tests I added (or what prevented me from doing so)
PR submission checklist:
RELEASE-NOTES.txt
if necessary.Testing checklist: