habitica icon indicating copy to clipboard operation
habitica copied to clipboard

challenge tasks in user's task lists are in wrong sort order after joining

Open Alys opened this issue 8 years ago • 10 comments

When you join a challenge, the tasks that are added to your own task list are not in the same order as they are in the challenge as shown in the Challenges page. They should be.

For challenges where the order is important, challenge owners can number each task and write instructions in the challenge for the participants to follow the numbers. That's probably a good idea even after this bug is fixed, since participants will still be free to reorder their own tasks.

Alys avatar Jun 03 '16 21:06 Alys

Hello, trying to replicate this to see if I can fix it, but I'm a bit confused.

Is there a certain way to order your challenge tasks or is this just referring to "the order in which the tasks are displayed"? Also, I found the tasks to all add in the correct order, but maybe I'm missing a step. In my test, the challenge creator had all the tasks in reverse order (is this the bug?), while for normal challenge participants, the tasks were all in correct order.

hmacphail avatar Jun 09 '16 04:06 hmacphail

Just noticed as well, I cannot rearrange the order of the challenge tasks on the challenge creation/edit pages. When I click to drag or click the push to top arrow, nothing happens. Tested on both chrome and firefox.

hmacphail avatar Jun 09 '16 05:06 hmacphail

The order in which tasks are displayed on the challenge's page is the order in which they should be displayed in your own task lists after you've joined the challenge. (Although you are permitted to reorder them in your own lists after you've joined.)

There is a different bug that prevents a challenge creator from sorting their tasks, but that's not related to this. https://github.com/HabitRPG/habitrpg/issues/1703

A fix for this issue can assume that the creator has put the tasks in the correct order, and should mimic that order when giving the tasks to the participants.

Alys avatar Jun 09 '16 05:06 Alys

When I recently added a new challenge, the order was completely rearranged when I hit save. It bears no resemblance to the order I added them.

ShulamitLH avatar Jun 29 '16 04:06 ShulamitLH

[memorable]

ghost avatar Jun 30 '16 14:06 ghost

I just tried creating a new challenge with a variety of tasks and difficulties. After saving, I had a different member of our party join the challenge. All of the tasks had randomly organized themselves and had all reset the difficulty to easy, despite that I had set them about 1/3 easy, 1/3 medium and 1/3 hard. I was unable to make any changes on the challenge using edit.

ShulamitLH avatar Jul 07 '16 15:07 ShulamitLH

I've made two challenges in the past month, and was careful about the ordering of the tasks in each. As soon as I hit save, the order was scrambled, so it's not even showing up in the proper order in the challenge listing, much less in participants tasks.

tricksyfox avatar Aug 04 '16 20:08 tricksyfox

I did some testing about this in the Challenge Sandbox guild. Please read the (looong) description of the challenge :bug: Bug Test Challenge 1: Testing Various Task Order Bugs for details!

To sum things up, there are two different bugs:

  • When the challenge creator is in a challenge automatically after having created or cloned it, the tasks are always in the wrong order in the creator's own Tasks page. This is a bug. The workaround is to leave the challenge and rejoin it. (Just clearing one's browser data does NOT work as a workaround but needs to be done anyway because of the second bug - please read on!)
  • When someone joins someone else's challenge, OR rejoins their own challenge after having left it before, the tasks are sometimes in the wrong order in the new participant's Tasks page. (And sometimes the challenge tag is missing, too.) This is another bug. The workaround for this one is to clear one's browser data (for example via Habitica's Clear Browser Data page) after joining, after which the challenge tasks will be in the right order, and the tag visible, too. (At least that's been the case in my tests.)

That means that if you create or clone a challenge, you need to do both: First leave (choosing the "Remove Tasks!" option), then delete the challenge tag, then join again, then clear browser data! (If it's still not sorted out after that, that would be yet another challenge bug, and you should report it... Don't we all love them?)

Would it be useful to separate this issue into two for these two bugs? (If so, someone else please do that!)

There are also some other bugs that can easily get confused with these two bugs:

  • One bug is that, when creating or cloning a challenge, the tasks will be saved in completely random order in the challenge. (This is issue 1703 "challenge items don’t retain sort when creating or editing a challenge". But don't get confused by the comments there - most commenters there mix it up with other bugs, too!)
  • Another bug is that, when trying to sort tasks in one's own Tasks page, the tasks sometimes don't keep the new order. Many misplaced comments in issue 1703 are actually about this. A more fitting place would probably be issue 7645 "To-Dos become unsorted - ToDo list sort order is not preserved". I don't know if there is another similar github issue about tasks other than To-dos. This bug probably isn't specifically a challenge bug. (It may be, I don't know. It might affect only challenge tasks, or it might affect challenge tasks differently than other tasks.) At least issue 7645 doesn't have a challenge bug label.

habitrpguser avatar Sep 06 '16 12:09 habitrpguser

I checked again today (only on desktop though, not in any app) and I could no longer replicate this bug. Both when I join a test challenge created by myself and when I join a challenge created by someone else, the tasks appear in my task list in the same order as in the challenge (as it should be). Does anyone else still experience this bug? Or is it still happening in one of the apps? (Today I also deleted my "Bug Test Challenge 1" from 2016 that I linked to in a previous comment. Most of the detailed test description in that challenge was obsolete and useless by now.)

habitrpguser avatar Nov 07 '20 22:11 habitrpguser

This does work for me now for Web and Android.

It should be noted when you clone challenges the tasks are out of order.

Also you can't move tasks once they been added to challenge.

cTheDragons avatar Nov 10 '20 02:11 cTheDragons