Users are reporting a bug where disabling the “Give this badge more than once” option for SQL-triggered badges is not preventing repeated awards. satonotdead initially reported the issue, having previously experienced problems with badge repetition linked to a previous issue. Michael12 confirmed experiencing the same bug and offered to share their badge SQL. Lilly requested the SQL and screenshots of badge settings from satonotdead and others to replicate the issue and verify configurations screenshots provided. The SQL provided by satonotdead selects users based on gamification scores and awards badges if they haven’s already received them. satonotdead shared images showing the problematic badges being repeatedly granted. JammyDodger questioned whether the issue stems from the SQL query’s attempt to handle multiple awards and referenced previous discussions about these badges previous discussion link. It’s unclear whether the problem is isolated to satonotdead’s instance or a wider bug.
אני מצטרף לכאן כיוון שנתקלתי באותה בעיה. גם השבתתי את ההגדרה ‘הענק תג זה יותר מפעם אחת’ בכמה תגים מבוססי SQL, אבל הם ממשיכים להינתן שוב ושוב. יהיה מועיל לדעת אם מישהו מצא פתרון עוקף או אם זה אושר כבאג. אני יכול לשתף גם את ה-SQL של התג שלי, אם צריך.
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
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?