# User\_flagging\_ratio\_count

**URL:** https://meta.discourse.org/t/user-flagging-ratio-count/117729
**Category:** Bug
**Created:** [May 14, 2019, 6:58pm UTC](https://meta.discourse.org/t/user-flagging-ratio-count/117729 "2019-05-14T18:58:54Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![DNSTARS](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/dnstars/32/100957_2.png) [@DNSTARS](https://meta.discourse.org/u/DNSTARS)
#### Post date: [May 14, 2019, 6:58pm UTC](https://meta.discourse.org/t/user-flagging-ratio-count/117729/1 "2019-05-14T18:58:54Z")

</div>

Hi chaps

I’m a little confused about ` /admin/reports/user_flagging_ratio`, either I’m doing something wrong or I think it’s bugged. I’ve tested it with someone who flagged 5 posts, agreed and took no action, this didn’t update so I thought maybe “agreed” needs to be “agreed and took action”, ran the test again silencing, suspending and hiding posts and no update.

The other flagging areas seem to be working fine.

---

<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: [May 14, 2019, 11:42pm UTC](https://meta.discourse.org/t/user-flagging-ratio-count/117729/2 "2019-05-14T23:42:31Z")

</div>

So this specific report is broken?

---

<div class="post-metadata">

### Author: ![DNSTARS](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/dnstars/32/100957_2.png) [@DNSTARS](https://meta.discourse.org/u/DNSTARS)
#### Post date: [May 14, 2019, 11:54pm UTC](https://meta.discourse.org/t/user-flagging-ratio-count/117729/3 "2019-05-14T23:54:44Z")

</div>

It appears to be yes, this section believes our site has had about 25 flags since the new year, anything else that refers to flags on the dash appears ok.

The game plan as we grow is to pay the top 10 “most helpful” flaggers in the community to incentivise and outsource moderating by tweaking flags… That’s how I ended up on that report which I suppose is rarely looked at otherwise.

We’re on Beta9+399

---

<div class="post-metadata">

### Author: ![j.jaffeux](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/j.jaffeux/32/60297_2.png) [@j.jaffeux](https://meta.discourse.org/u/j.jaffeux)
#### Post date: [August 6, 2019, 11:21am UTC](https://meta.discourse.org/t/user-flagging-ratio-count/117729/8 "2019-08-06T11:21:45Z")

</div>

I think that should fix it:

> <https://github.com/discourse/discourse/pull/7977>
>
> Without causing a division by zero error

The issue we had is that to prevent some error we had this `HAVING #{disagreed} > #{agreed}` clause which is essentially preventing a lot of results to show.

if you have 5 disagreed and 20 agreed, you wouldn’t show in results. This fix also bumps people with 0 disagreed flags, their score will be agreed^2.

---

<div class="post-metadata">

### Author: ![j.jaffeux](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/j.jaffeux/32/60297_2.png) [@j.jaffeux](https://meta.discourse.org/u/j.jaffeux)
#### Post date: [August 8, 2019, 8:09am UTC](https://meta.discourse.org/t/user-flagging-ratio-count/117729/9 "2019-08-08T08:09:42Z")

</div>


