Update statistics from backend more regularly
I'm DE based, but traveled to FR on 2024-10-08. I mapped using SC from the 8th to the 10th, when I returned to DE. On 2024-10-13 I traveled to NL and used SC until 2024-10-19. On 2024-10-18th (i.e. more than 7 days, but this is still the case today, 2024-10-20th) I looked at the 7 day statistics. There, the FR quests are still show. Similarly, the 7 day count on the main screen (when pressing the star), i.e. "last 7 days" also still includes the quest from FR in the overall number.
On the profile screen, the "7 day rank" for FR vanished this week (around 2024-10-15th), but so far no "7 days rank" for NL appeared. I met another mapper in NL and on his SC the "7 day rank" for NL was shown, both in the achievment screen as well as in the bar for the quest by country (when you tap on the NL flag) (I can report this as a different issue, if desired, but maybe this is related, hence I mention it here). The other mapper "only" traveled to NL, but not to FR (or any other country) beforehand.
How to Reproduce Go to country A, use SC. Return to your main country and quickly (within the 7 day limit) go to country B. Start mapping. Observe the achievement screens after the return from country A + 7 days.
Expected Behavior When 7 days elapsed, I expect the number in the * counter on the main screen to be reduced again (at least in the morning before solving new quests). Also in the achievement screens, I expect the flag (and count) from the first country (here: FR) to vanish 7 days after return from country A (here: FR).
Versions affected SC 59.2 Android: 13, there was an update from /e/OS 1.20 to 2.4.1 during last week.
but so far no "7 days rank" for NL appeared
Not necessarily a bug, iirc the local rank is only displayed if you are amongst the top X.
Can you confirm that number of changes in France are still being displayed in the "last 7 days" view despite them having been solved more than 7 days ago? Were they also uploaded more than 7 days ago? What is your OSM username?
For the NL rank: The other mapper did about the same as me (probably a little bit less), and he had a 7 days rank for NL.
As of now (2024-10-20, 15:19 UTC) the "last 7 days" ("Letzte 7 Tage" in German) is still shown, I left France on 2024-10-10.
I upload immediately, so yes, they were uploaded. (I just double checked, e.g. https://www.openstreetmap.org/node/5172479404, this was one of the last quests I solved).
My username is Helge Kreutzmannn.
I've looked at your statistics, they show up correctly from the server. For the last 7 days:
- 1362 in NL
- rank 5 in NL
- rank 164 total
So it looks like for some reason, the app is not pulling the latest statistics.
The desired behavior is that it downloads it anew on
- login
- every application start, if the device is currently connected to the internet
Now, could as well be that your app has been not re-started for a very long time. It is really up to the Android system when the app is re-started. When sent in to the background, it is usually just "frozen". If you remove the app from recent activities and start the app again, that should count as a re-start of the app.
Would you do that to confirm if this is the source of the issue?
Ok, I did the following: Pressed middle button on adroid, swiped SC upwards, and started it from the main screen again: Yes, now the statistics is correct.
(I'm not sure if I did this in the last two weeks).
Good, thanks.
Hmm, I am not sure if I want to change that behavior. Yes, it can lead to stale rank and last-7-days data, but what would be the alternative?
Querying the new statistics every time the user brings the app back to front? Too much.
Every time the user opens the profile screen? Uh, well, maybe?
As I'm not a real programmer, the only thing I could come up would be a some kind "last checked" stamp when opening the statistics page. If the "last checked" is from the previous day, the statistics would be fetched and the stamp updated. Otherwise the stamp would be left untouched.
If that is not possible/feasible, I can live with the current behavior, now that I know that I need to restart the app daily to get proper statistics (i.e. the old computer trick).
Good, thanks.
Hmm, I am not sure if I want to change that behavior. Yes, it can lead to stale rank and last-7-days data, but what would be the alternative?
Querying the new statistics every time the user brings the app back to front? Too much.
Every time the user opens the profile screen? Uh, well, maybe?
I don't suffer from this but ran into this accidentally. I thought perhaps in addition to the options mentioned above is it a possibility to update the statistics when the user tries to download new quests? Searching for new quests is something every user has to do and it is an activity that is not performed every few minutes.