bug: Price coverage on statistics page can exceed 100% #156
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
I suspect when calculating price coverage on the statistics page it's counting individual parts/lots or loose minifigures in the count of items with prices, but not in the total count of items.
In my case it's definitely loose minifigures with prices that are triggering the issue.
You were spot on with the diagnosis. That's exactly what was happening.
The price coverage number is
items_with_price / total_items. The bug was that the two sides counted different things.Before the fix:
The numerator already counted every priced item type:
But the denominator was only the set count:
total_items = total_setsSo a loose minifigure with a price got added to the top, but nothing got added to the bottom. With enough priced loose minifigs (or individual parts / lots) the top could grow past the total set count, and the percentage went over
100%.
After the fix:
The denominator now mirrors the numerator, same four item types:
I have a working dev build and it will be in the 1.5 release.
Nice, thanks again!