HabitRPG / habitica-chrome

Chrome extension for HabitRPG. Uses 3rd party productivity website events to trigger point gain/loss.
https://chrome.google.com/webstore/detail/habitrpg/pidkmpibnnnhneohdgjclfdjpijggmjj?hl=en-US
GNU General Public License v3.0
109 stars 47 forks source link

Pomodoro Tracker's pomodoros count as broken when completed #156

Open morahj opened 7 years ago

morahj commented 7 years ago

I've been using the integration with Pomodoro Tracker for a while and it had not shown any issue. But, a few days ago I changed the time of my pomodoros (from 30 to 25 minutes) and since then every time I complete the time of a pomodoro, the Habitica Extension count my finishing as if I had broken the pomodoro. I tried deleting and reinstalling the extension and deleting the Cache files of Pomodoro-tracker, but that didn't work. Also my Chrome version is up to date.

--- Want to back this issue? **[Post a bounty on it!](https://www.bountysource.com/issues/42456741-pomodoro-tracker-s-pomodoros-count-as-broken-when-completed?utm_campaign=plugin&utm_content=tracker%2F85447&utm_medium=issues&utm_source=github)** We accept bounties via [Bountysource](https://www.bountysource.com/?utm_campaign=plugin&utm_content=tracker%2F85447&utm_medium=issues&utm_source=github).
mattgodbolt commented 7 years ago

I'm seeing this even with the defaults. Every pomo completed gave me a broken HP hit :(

eeveeta commented 7 years ago

+1, I'm using the default settings and I tried deleting cache and re-installing the app as well. This just started happening recently. Also when I use tomato.es it always tells me that I'm overworking even when I'm following the pom exactly as it is.

aifuncesi commented 7 years ago

This problem appeared after the introduction of the new function "delay pomodoro" on pomodoro-tracker site.

kabutar111 commented 7 years ago

+1 happening with me also i m using 30 min duration

MagnusFundal commented 7 years ago

Ditto. Same problem.

ghost commented 7 years ago

Same problem. Come on, man.

Moonzenith commented 6 years ago

Having exactly the same problem here. Have anyone solved it yet?

Joseph67843 commented 6 years ago

I'm also seeing this one. @Belphemur, I don't know if you have time to look at this, but if you do, it would be awesome.

ETA: More precisely, it increments the positive counter (single pomodoro for the first 3 out of four completed, combo for the fourth) once every time a pomodoro is finished, and increments the negative counter and charges health (single pomodoro only) once each time a pomodoro or a break is completed. The result is 2 negatives every time you finish a pomodoro.

Joseph67843 commented 6 years ago

I don't know anything about Javascript, but I am guessing that the problem is along the following lines:

1) The integration code contains the following code:

    enable:function() {
       this.appBridge.addListener('pomTracker.pomodoro.done', this.pomodoroDone);
       this.appBridge.addListener('pomTracker.pomodoro.stopped', this.pomodoroInterrupted);
       this.appBridge.addListener('pomTracker.break.skipped', this.pomodoroInterrupted);

2) It looks like "pomodoroInterrupted" gets called at the end of a successful Pomodoro and at the end of a break, resulting in a negative point for every Pomodoro and every break.

3) The simplest fix would be just to remove the code that penalizes users, which would render this integration extremely helpful. Alternately, the cleanest solution would be to fix https://github.com/HabitRPG/habitica-chrome/blob/master/common/js/binds/pomodoroTracker.js so that it only calls the penalty functions in appropriate circumstances.

Joseph67843 commented 6 years ago

I have an idea how to fix this one (and #165 and #170) - I'll take a crack at it, hopefully over the next week or two/

roman-hres commented 5 years ago

Hi,

Works fine for me. Is this issues still reproducible ?