Real-time badging implemented for Local Groups


#1

I’ve implemented real-time badging for local groups. Let me know if anything weird happens with your badges.

I’ve used the following query changing the group name (g.name) for each badge:

Note the trigger and daily revocation settings.

I also noticed some badges have a setting Show post granting badge on badge page selected. I don’t know what it does so I’ve asked so that they can all be turned on/off as appropriate.


#2

Based on the answer provided on meta.discourse.org, the Show post granting badge on badge page setting doesn’t do anything for our local group badges. It is only relevant if the badge was awarded due to an action on a topic.

Here’s an example of posts linked to badges.

To be tidy the setting should be turned off for local group but, like planet Earth, it’s “mostly harmless” :wink:


#3

@Stephen this is such a massive improvement to how the Open Knowledge group badging system works. So happy with this. Cheers! :beers:


#4

@danfowler despite testing I’m not sure if it’s working 100% correctly. Everything worked for me but I’m an Admin. When @nikeshbalami, added members to the OKNP group, the badging task did not run.

So we have 1 member with a OK Nepal badge but 8 members in the oknp group. When I preview the badge query I get the correct result, so I can only assume that a when a user is edited or created event wasn’t triggered.

Any clues?


#5

And now we have two with badges. Perhaps it’s not the trigger but very slow performance?


#6

Nope, that was me twiddling with it. I added the other member to the group. Very strange.


#7

OK. I’ll change to query to daily so the Nepal badges get awarded. Then I’ll change the query back and test some more with @ned.


#8

Cool. Thanks for this.


#9

Added @ned to oknp group using /admin and badge was awarded. In fact all 9 badges were awarded :confused:

Edit:


#10

@stephen-testing got his badge. :smiley:

Totally confused why this didn’t work for @nikeshbalami

I’ll continue to monitor - please report any gremlins

Edit: @ned lost his badge :thumbsup:


#11

Note: Discourse has disabled badge queries https://meta.discourse.org/t/badge-sql-can-no-longer-be-edited-by-default/47894


#12

Hm. That’s something to think about. :thinking:


#13

Someone from OK could contact Discourse and ask them to turn it on. All new groups will have to have badges manually award unless we request this option to be turned on. cc: @mor


#14

I was wondering why I couldn’t config automatical awarding!

@danfowler- you are the main contact with them, can you email them about this?