What would you like done?
By default, Discourse prevents badges from being granted in categories that have restrictions (I have a category where only trust levels 2+ are allowed to see/post/reply.) I would like to be able to grant badges to users who are able to see/post/reply in that category. I don’t mind if all users can see the granted badges because access to this category is something to earn.
When do you need it done?
I’d love it done in the next two weeks.
What is your budget, in $ USD that you can offer for this task?
I can offer $100 or slightly more if I am woefully underestimating the amount of work this will require.
SELECT P.user_id, MIN(P.created_at) granted_at, MAX(P.id) post_id
FROM badge_posts P JOIN topics T ON T.id = P.topic_id
WHERE T.category_id IN (SELECT id FROM categories WHERE id = 50 OR parent_category_id = 50)
AND P.user_id >= 0 GROUP BY P.user_id HAVING COUNT(*) >= 1
Where users are rewarded for their first post in this category (it’s a creative writing/roleplay thing) and then I have other badges for 10, 25, 50, and 100. So it would be based on their interaction AND ability to see the category, not just their trust level (if I’m even understanding your suggestion, I admit this is all beyond my skillset as an author/publisher.)
This is a query I’d used in previous categories that I’ve been reusing for this (with altered cat #). It doesn’t currently work because the category is considered restricted and Discourse won’t allow or ignores queries for badges granted for activity in that category.