-
-
Notifications
You must be signed in to change notification settings - Fork 222
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
Sort by dependency #2727
Comments
Hi @ferife, thanks for the suggestion. For clarity, please supply:
You seem to be thinking about direct and indirect dependencies - so be sure to include examples of those, and how you wish them to be sorted. By supplying examples to be used in testing the implementation, you will be helping somebody do the work, and ensuring that what is programmed matches the behaviour you are requesting. Thank you in advance. |
Closed as no reply. |
Hi @claremacrae I apologize for taking so long to reply. Here are some examples pulled straight from my vault
presuming that they are being sorted by dependency, then by date, the result I'm hoping for is
|
As you can see, especially with the first two tasks in the result, the dependency takes precedence over the date, so textbook reading 7 is displayed before quiz 7 and before ExampleTask13 even though it is due later because quiz 7 cannot be done until textbook reading 7 is done |
Brilliant - that really helps clarify things a lot. It will get tricky when a task depends on multiple other tasks, or if there are cyclic dependencies, but I can see the basic principle. |
Great. I edited my example to clarify that if a dependency is due after tasks unrelated to the dependent which is due before those tasks, the dependency should appear before all of those too. That's what ExampleTask13 is about |
That isn't how the Tasks sorting works sadly.
So as far as I can see, sorting by dependency would have to do something like put all the tasks without a dependency after all the tasks with a dependency. It might require some kind of grouping to get the behaviour you want. (And whilst you would like the second criterion to be due date, someone else may choose start date, or priority... so it's not obvious how to write special-case code to combine together sort criteria in the way you show in your example) |
Fair enough. In that case, maybe the query example I gave could be the result of sorting by dependency and grouping by due date. It seems to me that if the primary sorting criterion is dependency, the user should specify the other secondary criteria using Though if that's how that's going to work users would probably want a way to hide the group headings, but that seems like a separate discussion from this. |
Regarding cyclic dependencies, the best I can come up with would be to throw up an error message if one is detected to avoid infinite recursion problems. Perhaps there is a better solution, but I wouldn't really know since I've yet to need cyclic dependencies in my vault |
🔖 Feature description
A sorting option that puts task dependencies at the top and their task dependents below them. Hopefully it puts tasks that are directly dependent on each other together.
✔️ Solution
a
❓ Alternatives
No response
📝 Additional Context
No response
The text was updated successfully, but these errors were encountered: