Ik spring hier even in omdat ik tegen hetzelfde probleem aanloop. Ik heb ook de instelling “Geef deze badge meer dan eens” uitgeschakeld voor verschillende op badges gebaseerde badges, maar ze worden nog steeds herhaaldelijk toegekend. Het zou nuttig zijn om te weten of iemand een oplossing heeft gevonden of als dit bevestigd is als een bug. Ik kan ook mijn badge SQL delen als dat nodig is.
SELECT
gs.user_id,
current_timestamp AS granted_at
FROM
gamification_scores gs
WHERE
(:backfill OR gs.user_id IN (:user_ids))
AND gs.date >= (current_date - interval '1 month')
AND NOT EXISTS (
SELECT 1
FROM user_badges ub
WHERE ub.user_id = gs.user_id
AND ub.badge_id = YOURIDOFBADGE
)
GROUP BY
gs.user_id
HAVING
SUM(gs.score) > 11
Ik heb alleen ‘Weergeven op openbare badgepagina’ en ‘dagelijks intrekken’ geselecteerd. De activator is dagelijks terugkerend.
I would still like to see a screenshot, thanks. the reason is I can verify that it is the exact same screen (version) and the settings are the same even with different languages in interface (also a rogue component or plugin may be changing the settings page). for example, I don’t want to just assume “activator” means “trigger” (although I think it does in this case).
Without testing, one of the things that looks like it doesn’t belong is the ‘AND NOT EXISTS’ section. Are you trying to handle not awarding multiples within the query itself?