Why didn't I receive the Gives back badge?

First off, let’s clarify that I’m using myself as an example just to make sure the issue I’m seeing is not a bug somewhere in the badge machinery :slight_smile:

The Gives back :heart: badge

is granted when you’ve received 100 likes and have given 100 or more likes in return.

Cool! So I gave 464 likes and received 128, I should totally have this badge, but no, I don’t. I see users with similar numbers in likes received/given than me who have it, so what happened? Is a certain ratio needed as with other badges?

Possibly.

More likely due due another reason.

Has the job ran since passing the threshold?

Were all of the Likes in Categories that granted badges? i.e. the setting
“Allow badges to be awarded in this category”
* note, messages don’t have a category

If you prefer code the query is

SELECT us.user_id, current_timestamp AS granted_at
FROM user_stats AS us
INNER JOIN posts AS p ON p.user_id = us.user_id
WHERE p.like_count > 0
  AND us.likes_given >= 100
  AND (:backfill OR us.user_id IN (:user_ids))
GROUP BY us.user_id, us.likes_given
HAVING COUNT(*) > 100

And the setting is

Trigger
Update daily

2 Likes

Perhaps @eviltrout can take a quick look on Monday.

2 Likes

The query is based on the number of posts that have received a like, not the total number of likes received. You’ve only had 57 posts that have received a like.

The short description of “Has 100 liked posts and gave 100 likes” seems more accurate than the long description.

4 Likes

Oh, that makes sense, thanks! It’s the description that needs to be fixed then :slight_smile:

3 Likes

Good point! I just fixed the long descriptions for these. Sorry about the confusion, my bad!

5 Likes