How to achieve the campaigner badge


(Allen - Watchman Monitoring) #1

I’ve got 4 people invited here on meta

https://meta.discourse.org/users/watchmanmonitor/invited

and 8 people on my hosted discourse (/users/allen/invited)

and so I would think I’d have this badge (as would more than just @sam

https://meta.discourse.org/badges/26/campaigner

Would someone check it out?


(Jeff Atwood) #2

Yeah that does seem like a bug @sam.


(Sam Saffron) #3

The definition is 3 members, not 3 users

They got to be tl1


(Allen - Watchman Monitoring) #4

On my hosted site, I have invited 11 members and they are all TL1

What’s the difference between members & users?


(Sam Saffron) #5

Sorry I meant TL2

    SELECT u.id user_id, current_timestamp granted_at
    FROM users u
    WHERE u.id IN (
      SELECT invited_by_id
      FROM invites i
      JOIN users u2 ON u2.id = i.user_id
      WHERE i.deleted_at IS NULL AND u2.active AND u2.trust_level >= 2 AND not u2.blocked
      GROUP BY invited_by_id
      HAVING COUNT(*) > 3
    ) AND u.active AND NOT u.blocked AND u.id > 0 AND
      (:backfill OR u.id IN (:user_ids) )

Its meant to be a reasonably hard to get badge

Member is defined as TL2 throughout Discourse.


(Allen - Watchman Monitoring) #6

I guess that’s fine for meta, but it means that badge won’t work for my forums, where we don’t let members invite members.


(Kane York) #7

In that case, you should disable the badge.


(Sam Saffron) #8

(Jeff Atwood) #9

I think this is far too hard to get. This reads more like the gold level criteria.


(Sam Saffron) #10

I can bump it down to tl1 if you wish


(Jeff Atwood) #11

Yeah that would be better, we want to encourage invites. Gold level of this can use TL2.


(Sam Saffron) #12

Done

https://github.com/discourse/discourse/commit/1db92e6027837f6a6db1dcffc281f4af97391f86


(Kane York) #13

Change the text for “Champion” to be “Invited {n} active members” to indicate it’s stricter than the previous level. (It still means TL2, and it’s kinda weird terminology-wise, but whatever. Anyone have a better idea?)