Closed following5 closed 5 years ago
Funny that noone noticed the data lack for 18 months
@tripper1971 Noticed, but ignored this :)
@following5 are you sure that there was a "data lack" - I believe (not sure) that everything is counted well, only user don't get notification about the new badges on time.
When user submit log next time (but directly by website - not by OKAPI) the notification appears.
We had known about this issue but - yes - ignored it because it needed changes at OKAPI side and in fact was a minor (corner case) thing.
I am sure that the badge_user
table is not updated by OKAPI. Will be correctly updated when the user submits, edits or deletes another "Found it" or "Attended" log on the website.
So if a user only logs by an Okapi App, I think there will be no merits at all ...?
So if a user only logs by an Okapi App, I think there will be no merits at all ...?
If "only" by OKAPI app - I agree - you're right. But after the first log by websites all badges will be applied. Creating a log is only a trigger for recalculating the stats.
But generally - I agree - we should prepare some solution for it.
When user submit log next time (but directly by website - not by OKAPI) the notification appears.
So if a user only logs by an Okapi App, I think there will be no merits at all ...?
Almost all my logs are added with OKAPI. When I added one log via the website a few weeks ago https://github.com/opencaching/opencaching-pl/issues/1616 happened So both issues are related.
b9a86651 adds a signalling mechanism, which hands merit badge update requests over to OCPL code. There they can be processed via cronjob.
In March 2017, the optional "Merit Bages" feature was added to OCPL code; see MeritBadgeController.php. It is enabled e.g. at Opencaching.PL.
services/logs/submit
must update the user's badges for new "Found it" and "Attended" logs. Same with editing log types and deleting logs; see #421.Funny that noone noticed the data lack for 18 months. Maybe because OCPL native code recalculates the bage data after every change, so it is fixed with the next on-site Found/Attended log.