Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tasks cannot be deleted after leaving or ending a challenge #2763

Closed
heyheyitsrey opened this issue Feb 5, 2014 · 15 comments
Closed

Tasks cannot be deleted after leaving or ending a challenge #2763

heyheyitsrey opened this issue Feb 5, 2014 · 15 comments

Comments

@heyheyitsrey
Copy link

Items on "Habits" list don't disappear after leaving the related challenge and cannot be deleted ("Delete" icon not appearing/not available) in the "habits" view in the browser version (Chrome): http://cl.ly/image/013S3a1S3y1J (zoomed: http://cl.ly/image/1f253w0H2t0Z)

(it is possible to delete the same habits off the mobile version: http://cl.ly/image/443Z0f3q1N3w)

I do not remember if I selected "delete related habits" when leaving the challenge, but they still should be deletable in both versions.

UserID: 11af7c8c-62d1-4737-a3e3-15513ffe6f95


edit by admin:

If you have this problem, please see the steps listed in "Deleting a Challenge Task" on the wiki's Challenges page.

If you go through all of those steps over two days and the challenge tasks still can't be deleted, report the problem by commenting below. Include your User ID (go to Settings -> API to find it; it is not the same as your HabitRPG login name or profile name).

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

@snicker
Copy link
Contributor

snicker commented Feb 10, 2014

Could not reproduce in an obvious way, looking for other ways to reproduce

Attempted reproduction:

  • Create new user snicker to be challenged
  • Create new user snicker_challenger to be the challenger
  • snicker_challenger created a public guild
  • snicker_challenger created a guild challenge with one habit, one daily, one todo, and one reward with default values
  • snicker joined public guild created by snicker_challenger
  • snicker joined challenge created by snicker_challenger
  • snicker performed a hard page refresh
  • snicker left challenge, opting to keep challenge habits
  • delete button available on challenge tasks
  • delete button functional on challenge tasks

@snicker
Copy link
Contributor

snicker commented Feb 10, 2014

@rodzajowo around when did you join the challenge? Was it a public, party, or guild challenge? can you reproduce this with other challenges? Is this isolated to Chrome or will you experience the issue on other browsers as well, as long as you are not on the mobile site?

@lefnire I suspected that this was just an issue with display of the button based on conditions that weren't being met either through bind-once, but it could possibly be isolated to this user... you might want to peek at the DB and see

@heyheyitsrey
Copy link
Author

Hi,

I joined the challenge a few days ago. I quit it that same day or the next, when I realised that I preferred to set up my own schedule for tasks.

I cannot now find the challenge, but it included: Jogging or walking, 15 squats, 30 lunges - each leg, 45 second plank, 10 tricep dips, 50 seconds wall sit, 30 crunches (in the habits), and possibly 30 minutes workout in the dailies, and each of the habits had a youtube link as the only item in the description (featuring how to do the workout) - maybe that will help you in tracking the challenge down.

I tried opening HabitRPG in Firefox, and the tasks were also not deletable.

It has not happened in any other case, but in some cases they will appear doubled if I have hRPG open both on the computer and on my phone (but that is a whole other issue).

Feel free to access my account from the backend if that would in any way help you track down the issue, as I don’t think I can be too much help here.

Thanks,
A.
(rodzajowo)

Wiadomość napisana przez snicker [email protected] w dniu 10 lut 2014, o godz. 22:25:

@rodzajowo around when did you join the challenge? Was it a public, party, or guild challenge? can you reproduce this with other challenges? Is this isolated to Chrome or will you experience the issue on other browsers as well, as long as you are not on the mobile site?

@lefnire I suspected that this was just an issue with display of the button based on conditions that weren't being met either through bind-once, but it could possibly be isolated to this user... you might want to peek at the DB and see


Reply to this email directly or view it on GitHub.

@snicker
Copy link
Contributor

snicker commented Feb 10, 2014

@lefnire I suspect a deeper issue is to blame here, and I noticed there were other instances of this in the tracker though not described in the same way (#1915, #2474, #2378).

The way challenges work now is by synchronizing the challenge tasks to the users' tasks. If an error occurs during synchronization (IE, when a user opts to leave a challenge or the challenge is ended), the user's task will still have a challenge.id, but not a challenge.broken. Now that the challenge is gone or left, there will be no delete button (because user.challenge.id exists), and no way to mark the challenge as broken or left.

I see a potential fix, but it's not very fun. Run a periodic database prune that seeks out tasks with a challenge id that is either:

  • complete
  • no longer exists
  • the user is no longer participating in

and remove the challenge field from that task record.

I did notice one other thing in testing, when a challenge was deleted by the challenger, the user.challenge field did not have the challenge id removed.

I also want to propose a thought exercise that may cause this bug to be replicated, as @rodzajowo pointed out that a mobile app may come into play.

  1. user joins a challenge on web
  2. challenge tasks are synchronized to the user object
  3. user loads mobile app and synchronizes with server
  4. user leaves a challenge on web, user object is properly updated to remove the user.task.challenge field
  5. user performs a sync from the mobile app to server and user.task.challenge is written back to the database.

This should be possible, as pointed out in issue #2751, and @colegleason has suggested a fix there that may prevent this issue from occurring in the future.

@Joy2b
Copy link

Joy2b commented Feb 13, 2014

It sounds like this, 1915 and 2692 are all the same issue. The notes do include a specific challenge name, browser versions, etc, but I'm not sure how helpful those would be in recreating the issue.

Possible workarounds?
Having the delete button on to challenge items wouldn't be so bad. You could add a pop up before deleting challenge items.
You could make available a link that lets you edit anything on the task page. If there's concern about accidental usage, you could hide it someplace, such as the settings page.

@deilann
Copy link
Contributor

deilann commented Feb 14, 2014

@Joy2b If you put a pound sign in front of the issue ticket number, they become linkable. However, I referenced #1915 and #2692 over here and closed them three days ago because of this.

@watermydoing
Copy link

This happened to me too, after the February Clean the Dungeon challenge ended, I was stuck with the Daily and To-Dos. I couldn't delete them in Chrome. The daily was deletable from the mobile iPhone app, but not the To-Dos. Not sure if this helps with the issue, but I figured it was worth mentioning Dailies and To-Dos.

@MrsTofu
Copy link

MrsTofu commented Aug 1, 2014

I have a different browser and am using a desktop pc to access Habit, but I am having the same issue described in the other tickets listed above (#1915 and #2692) with a different challenge.

@deilann
Copy link
Contributor

deilann commented Aug 1, 2014

@MrsTofu Have you tried clicking one of the tasks? (Actually as if you're doing it, not just the task body.) That usually triggers the tasks to realize the challenge is over, and makes it so that the megaphone shows as broken. Then you can click on the megaphone and it will give you the option to delete the tasks.

@MrsTofu
Copy link

MrsTofu commented Aug 1, 2014

@deilann I tried clicking the tasks as if crediting myself the task. At first it didn't do anything other than credit me the XP and gil, but it worked after I re synced the page.

@deilann
Copy link
Contributor

deilann commented Aug 1, 2014

Glad to hear it.

On Fri, Aug 1, 2014 at 1:20 PM, MrsTofu [email protected] wrote:

@deilann https://github.com/deilann I tried clicking the tasks as if
crediting myself the task. At first it didn't do anything other than credit
me the XP and gil, but it worked after I re synced the page.


Reply to this email directly or view it on GitHub
#2763 (comment).

@Alys Alys changed the title Habits not deletable in Chrome after leaving a challenge. Tasks cannot be deleted after leaving a challenge Sep 8, 2014
@Alys Alys changed the title Tasks cannot be deleted after leaving a challenge Tasks cannot be deleted after leaving or ending a challenge Jan 13, 2016
@MeliFlaquer
Copy link

Hi!

I have to tasks (habits), that I did not create on my lists every day. I delete them and they come back the next day, some days they return after few hours.

They first popped up when I joined a challenge that encouraged every user to create their own habits depending on everyone's specific goals while doing the same dailies (dedicating an X allotted amount of time to our goals each day). The challenge ended over a week ago and the reappearing tasks are really annoying.

The web app was giving me errors for the last few days and that is why I did not report this sooner. I am aware that it is not the exact same problem as not being able to delete the tasks at all, but I figured it is pretty similar.

@paglias
Copy link
Contributor

paglias commented Jun 1, 2016

Should be fixed

@paglias paglias closed this as completed Jun 1, 2016
@micirox
Copy link

micirox commented Sep 7, 2018

USER ID: 91b6c356-db12-464d-b936-f36362fe578c

I cannot delete two of my tasks related to a challenge:

  1. Put all electronics...
  2. Wind down...

Please help me delete them. Thank you!

@ilenia-magoni
Copy link
Contributor

@micirox : if you follow the instructions in this wiki page and post in the Report a Bug guild someone will be able to help you

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests