Recently we add answered solved plugin in our discourse forum and also add their badges as described [here].
1 accepted badges working pretty good but 10 accepted answer badge (Tech Support) not working, it is returning error, see the below snapshot of the error.
We are using this code:
SELECT id user_id, current_timestamp granted_at FROM users WHERE id IN ( SELECT p1.user_id FROM post_custom_fields pc JOIN badge_posts p1 ON p1.id = pc.post_id JOIN topics t1 ON p1.topic_id = t1.id WHERE p1.user_id <> t1.user_id AND name = 'is_accepted_answer' AND p1.user_id IN ( SELECT user_id FROM posts WHERE :backfill OR p1.id IN (:post_ids) ) GROUP BY p1.user_id HAVING COUNT(*) > 9 )
Please help me because when we try to preview this code implementation so it is returning an error.
: Discourse Solved (Accepted answer plugin)