-
Notifications
You must be signed in to change notification settings - Fork 4.1k
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
challenge tasks don’t retain sort order when creating or editing a challenge #1703
Comments
I think this issue and the closed issue #5647 ("Cannot rearrange tasks when creating or editing a challenge.") are different issues (though related). One is about tasks changing order in one's personal tasks page after joining the challenge. The other is about not being able to reorder tasks in a challenge while editing. Those are/should be two different orders. (One of the tasks inside the challenge as you see them before you join, the other of your personal tasks after you've rearranged them into your own preferred order.) I'd very much like to have the feature to reorder challenge tasks during challenge creation. It would save much work since now the only way to do it is to delete tasks and recreate them in the right order. |
I just cloned a challenge, and the task order changed. So now you can't sort them when you create them, you can't sort them when you edit the challenge, and you can't rely on them staying sorted when you clone the challenge. :( The challenge I cloned was created before the change to API v3. (I'm not sure if that makes a difference but I thought I'd mention it. I haven't tested it with newer challenges.) |
I did some testing about this in the Challenge Sandbox guild. Please read the (looong) description of the challenge 🐛 Bug Test Challenge 1: Testing Various Task Order Bugs for details! To sum things up:
Those are definitely bugs. (Ok, the last one is rather a missing feature.) So, is there no workaround? Yes, there is! (At least it has worked so far...)
(Of course, you could always just simply number the tasks and leave it to each participant to sort them in their own Tasks page...) Also, please don't confuse this bug with other bugs! (For example, issue 7599 (challenge tasks are in wrong order in one's own Tasks page directly after joining, creating, or cloning), or issue 7645 (when sorting tasks in one's own Tasks page, the order isn't saved properly, or changes unexpectedly).) |
This issue might be easier to fix now because there is code for sorting tasks in Group Plans: #8358 It's possible that the code could be reused or copied for challenges. Or I might be completely wrong. :) It's probably worth a look though. |
Yep, the code allows to order challenge tasks (and can be shared between all three). Although, there needs to be a taskOrder object on the challenge - not sure if that exists. |
This is definitely still an issue so I'm reopening it. Note the comments above from me and TheHollidayInn from January 2017 about sorting. tasksOrder does exist in challenges, for example:
|
This is about challenge tasks not keeping the same order when added to the user's list? So it's different from the issue @SabreCat reported? |
It looks like this isn't an issue anymore. Should it be closed? |
It is still an issue. What's supposed to happen is that the order of the tasks you see on the challenge's screen should be the same as the order of the task IDs in the challenge's However I've realised that the challenge's page has lost the ability for the challenge owner to reorder the tasks. They should be able to drag and drop in the same way that a user can drag and drop their own tasks. Admins (moderators and staff) should also be able to drag and drop the challenge's tasks (there's already code for challenges that gives admins the same rights at the challenge owner). Other players should not be able to drag a challenge's tasks. I'll update the top post with this information since dragging-and-dropping should be implemented at the same time as obeying the tasksOrder object.
|
I've created a PR! #12021 |
Hi @alecbrick, are you still working on this one? :) If I don't hear back, I'll set this back to "help wanted" in about a week. |
@alecbrick I'm setting this issue back to help wanted, but if you want to pick it back up, let us know! |
I've removed some old comments that are no longer relevant and updated the top post to mention that a contributor should review the other comments here and in #12021 Ideally we should collate all the comments from both sources and purge anything irrelevant to make this easier to pick up. :-/ If I can find time I might do that. |
I'm going to take over that PR, it was almost done and contains a lot of good refactoring, I'll try to finish it this or next week |
I checked again today - and when cloning a challenge, the cloned challenge still has a different (apparently randomly mixed up) task order than the original challenge. |
Thanks for the update! I don't think a fix has actually been completed for this anyway, so it would be expected that things are still not working that way... is that right, @paglias? |
@habitrpguser this is still open indeed! We have a quite complete PR at #12204 and if you could finish the remaining issues it would be great! |
This bug still happens! I don't know if challenge tasks change order if a challenge is cloned once (I couldn't reproduce that), but they definitely do if a challenge is cloned and then that clone is cloned again. Please see examples: https://habitica.com/challenges/79fabb8c-f99a-459f-bdb7-ed810f25661b https://habitica.com/challenges/7f96108c-c086-4ae1-9fa4-7b2006bbb965 https://habitica.com/challenges/6cec332e-8ddc-46f7-afe6-f2a9cb212311 |
@habitrpguser Thanks! I've logged it as a new issue here: #13328 |
One can reorder items on the Challenges tab but the sort reverts.
EDIT by Alys 2020-05-13: Before working on this, please read the comments below and also the comments in this pull request: #12021 . If you think the code in that PR is suitable for re-use in your solution, you're welcome to use it - please mention in your PR that you've done so.
EDIT by Alys 2017: This issue will be easier to fix now because there is code for sorting tasks in Group Plans (#8358) and it can be reused for challenges. Copying from @TheHollidayInn's comment below:
"the code allows to order challenge tasks (and can be shared between all three). Although, there needs to be a taskOrder object on the challenge - not sure if that exists."
EDIT by Alys 2020-02-28: What's supposed to happen is that the order of the tasks you see on the challenge's screen should be the same as the order of the task IDs in the challenge's
tasksOrder
object. Below is an example of that object in a challenge's document.An additional problem is that the challenge's page has lost the ability for the challenge owner to reorder the tasks. The owner should be able to drag and drop in the same way that a user can drag and drop their own tasks. Admins (moderators and staff) should also be able to drag and drop the challenge's tasks (there's already code for challenges that gives admins the same rights at the challenge owner). Other players should not be able to drag a challenge's tasks in the challenge's own page (of course they can drag their own copies of the tasks after they join the challenge).
The text was updated successfully, but these errors were encountered: