Locked query field for system badges

This is my first topic after become a member here since 222 days ago.

  1. How to copy-paste this code?

  2. I want to give a badge for 25 successful invitations. So, I only need change the value HAVING COUNT (*) >= 5 into HAVING COUNT (*) >= 25, and give a Gold badge type too. Am I right?

I found similar topic "Promoter" Badge broken? but I just want to confirm, because I am not a really understand in coding.

Sorry for my stupid question.

1 Like

Here are the steps for enabling the SQL Badge Queries

6 Likes

Thank you Cpradio, yes I have enabled the SQL within 3 days, but its still locked.
I believe its for security purpose.
I tried to explore the Github too, but still does not know how to find the code line.

1 Like

You can find the badge query SQL here: https://github.com/discourse/discourse/blob/master/lib/badge_queries.rb

5 Likes

Thank you very much Simon.
I put wrong keyword in searching the code in the repository.
After I found the sql query, I still confuse.

I want to open another support topic, to make another question relating to this.
Thank you.

1 Like

This topic was automatically closed after 33 hours. New replies are no longer allowed.