Habitica: a negative number of gold-purchasable gems is confusing - display zero instead

Created on 28 Dec 2016  路  5Comments  路  Source: HabitRPG/habitica

When a subscriber's number of gems already bought with gold in the current month is larger than their monthly gem cap, a negative number is displayed on the gem in the Market.
I.e., when purchased.plan.gemsBought > 25 + purchased.plan.consecutive.gemCapExtra you see something like this:
image
The negative number is strictly correct, but it looks odd and can be (incorrectly) interpreted as a bug.

So the fix required for this issue is that when the number of purchasable gems is negative, we should just display zero, instead of displaying the negative number.

_FYI, this situation can occur when the subscriber had a long-lasting subscription earlier in the month with a high gem cap and they bought all of those gems, then allowed the subscription to end. If they create a new subscription in the same month, their new monthly gem cap will be lower, and so the number of gems bought that month will be more than their current gem cap. We do not need a change to that behaviour, we just need to display zero instead of displaying a negative number._

minor status on hold

Most helpful comment

I'd like to fix this.

All 5 comments

I'd like to fix this.

@mylesdakan Thank you!

@mylesdakan I'm putting this on hold because we're most of the way through a project to change the website's front-end code and this issue might no longer happen afterwards, or if it does, there'll be new code that will need to be modified to fix it. We'll assess it after the new website code is live and then if it's still needed, you'd be welcome to keep working on it if you wish.

I haven't seen this happen; is it still an issue?

If it is, we can reopen this.

Was this page helpful?
0 / 5 - 0 ratings