Habitica: "Zero-day streak" gives 21-day streak achievement

Created on 26 Jan 2014  Â·  11Comments  Â·  Source: HabitRPG/habitica

Hi, today I tried to restore a daily's streak to 0 (I checked it off yesterday, but today I realized I hadn't actually done the task). When I entered 0 in the "restore streak" box and clicked Save, the streak counter displayed as "-1". I checked it off for today, and a dialogue box appeared saying that I stacked my 21-day streak achievement. The daily's streak counter is now blank (zero).

(Plus, yesterday's accidental check was day 21 of a streak, so I now have two more of those achievements than I deserve, oops!)

Browser: Chrome Version 32.0.1700.76 m
User ID: 3ab30744-c44f-491a-b69e-c9eeefa5f24e
I didn't see any errors in the console.

Please let me know if you need any more info - Thanks!

Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.

minor Task Page status in progress

Most helpful comment

I'm working on this.

All 11 comments

Ahah, I think I know what that is. I'm guessing the system looks for multiples of 21.

0 is, in fact, a multiple of 21. I'll look into it.

Thanks!

I've posted this to Aspiring Coders.

If someone decides to work on this, please comment here to claim it. Ask for help here if you need it!

Has this been taken care of?

I tested by repeating the steps from the OP and it still behaves like that. However, we probably want to put this on hold for now. We'd need to modify code under common/script for this, which is best done after version 3 of the API has been released (in development now).

@Alys Yep!
On Fri, Mar 18, 2016 at 5:51 AM Alys [email protected] wrote:

I tested by repeating the steps from the OP and it still behaves like
that. However, we probably want to put this on hold for now. We'd need to
modify code under common/script for this, which is best done after
version 3 of the API has been released (in development now).

—
You are receiving this because you commented.
Reply to this email directly or view it on GitHub
https://github.com/HabitRPG/habitrpg/issues/2578#issuecomment-198303646

I'm most of the way through refactoring common/script/ops/scoreTask.js which contains the code for this, so I'm assigning this to myself.

@Alys are you still planning to work on this?

@khipkin I was intending to do it, but was waiting on https://github.com/HabitRPG/habitrpg/pull/7607 which I haven't completed yet because I had some questions about what tests were appropriate, and I've been forgetting to follow up on that. However I've got holidays coming up so I'll probably just write the tests I have in mind. Once the refactored scoreTask.js is live, other changes to it will be easier, including this one. If you want to work on this, I'll happily relinquish it to you. I clearly am not good at getting through issues promptly. :-/

Is this still an issue after the redesign?

Yes, same issue and cause.

I'm working on this.

Was this page helpful?
0 / 5 - 0 ratings