# Why didn't I receive the Gives back badge?

**URL:** https://meta.discourse.org/t/why-didnt-i-receive-the-gives-back-badge/44240
**Category:** Support
**Created:** [5월 14, 2016, 2:33오후 UTC](https://meta.discourse.org/t/why-didnt-i-receive-the-gives-back-badge/44240 "2016-05-14T14:33:15Z")
**Posts on this page:** 7
**Page:** 1

<div class="post-metadata">

### Author: ![steko](https://avatars.discourse-cdn.com/v4/letter/s/c77e96/32.png) [@steko](https://meta.discourse.org/u/steko)
#### Post date: [5월 14, 2016, 2:33오후 UTC](https://meta.discourse.org/t/why-didnt-i-receive-the-gives-back-badge/44240/1 "2016-05-14T14:33:15Z")

</div>

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 🙂

The _Gives back_ ❤ 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](https://meta.discourse.org/users/steko/summary), I should totally have this badge, but [no, I don’t](https://meta.discourse.org/badges/32/gives-back). 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?

---

<div class="post-metadata">

### Author: ![Mittineague](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/mittineague/32/114259_2.png) [@Mittineague](https://meta.discourse.org/u/Mittineague)
#### Post date: [5월 14, 2016, 2:58오후 UTC](https://meta.discourse.org/t/why-didnt-i-receive-the-gives-back-badge/44240/2 "2016-05-14T14:58:06Z")

</div>

> [@steko](#):
>
> a bug somewhere in the badge machinery

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

```sql
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

---

<div class="post-metadata">

### Author: ![codinghorror](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/codinghorror/32/110067_2.png) [@codinghorror](https://meta.discourse.org/u/codinghorror)
#### Post date: [5월 14, 2016, 6:55오후 UTC](https://meta.discourse.org/t/why-didnt-i-receive-the-gives-back-badge/44240/3 "2016-05-14T18:55:37Z")

</div>

Perhaps @eviltrout can take a quick look on Monday.

---

<div class="post-metadata">

### Author: ![eviltrout](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/eviltrout/32/5275_2.png) [@eviltrout](https://meta.discourse.org/u/eviltrout)
#### Post date: [5월 16, 2016, 3:59오후 UTC](https://meta.discourse.org/t/why-didnt-i-receive-the-gives-back-badge/44240/4 "2016-05-16T15:59:45Z")

</div>

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.

---

<div class="post-metadata">

### Author: ![steko](https://avatars.discourse-cdn.com/v4/letter/s/c77e96/32.png) [@steko](https://meta.discourse.org/u/steko)
#### Post date: [5월 16, 2016, 4:03오후 UTC](https://meta.discourse.org/t/why-didnt-i-receive-the-gives-back-badge/44240/5 "2016-05-16T16:03:24Z")

</div>

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

---

<div class="post-metadata">

### Author: ![codinghorror](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/codinghorror/32/110067_2.png) [@codinghorror](https://meta.discourse.org/u/codinghorror)
#### Post date: [5월 16, 2016, 10:22오후 UTC](https://meta.discourse.org/t/why-didnt-i-receive-the-gives-back-badge/44240/6 "2016-05-16T22:22:29Z")

</div>

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

---

<div class="post-metadata">

### Author: ![codinghorror](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/codinghorror/32/110067_2.png) [@codinghorror](https://meta.discourse.org/u/codinghorror)
#### Post date: [5월 16, 2016, 10:22오후 UTC](https://meta.discourse.org/t/why-didnt-i-receive-the-gives-back-badge/44240/7 "2016-05-16T22:22:31Z")

</div>


