question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Functionality change report (not exactly a bug)

See original GitHub issue

What happened?

This seems to be a regression/functionality loss introduced with the “Tasks update”, I’m assuming. I’m marking it as “Mobile” since I’m writing this in a mobile device, but don’t expect it to work either on a computer.

See correction at the end.

On updating from 0.4.26 to 0.5.26, the default behaviour of task queries in DQL has removed “group by file”, and adding group by file prevents sorting by task fields. I.e. before, the following would order tasks, per file, according to whether they were completed or not, with uncompleted tasks would be at the end (I had additional sort and select rules, this is just a minimal example):

TASK from "/projectA" WHERE
    type = "project"
    SORT completed ASC

This would render something like:

ProjectA
[ ] Undone task
[ ] Another undone task
[x] Done task

Marking the first task done, would re-render it as

ProjectA
[ ] Another undone task
[x] Done task
[x] Undone task 

With the improvements from 0.4.26 to 0.5.26 (which are plenty!), automated grouping by file is gone, and then we need to introduce manually the grouping:

TASK from "/projectA" WHERE
    type = "project"
    GROUP BY file.name

but in this situation sorting no longer works (since either GROUP BY takes precedence if sorting before grouping, or the fields are non-existant if sorting afterwards), GROUP BY sorts by what is essentially group.name, alphabetically.

This doesn’t seem fixable in dataviewjs without replicating a lot of internal Dataview logic, since the behaviour of dv.taskList(query, true) seems to be exactly the same of the DQL queries.

Correction

Sorting by done/undone (and likely internal tags of each task) still does work, but what is lost is sorting by any file related field.

DQL

No response

JS

No response

Dataview Version

0.5.26

Obsidian Version

1.2.2 (53)

Device

iPad Pro 2021

OS

iOS 15.5

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:11 (1 by maintainers)

github_iconTop GitHub Comments

4reactions
mnvwvnmcommented, Jun 11, 2022

@awinecki, @rberenguel issue is different: is related with the sort in task level after grouping. In your case you want to sort in page level, something you can because you’re grouping by a page level field. The question is: after grouping you need to add the prefix rows. before the field. For example, if you want to sort your groups (by name) by file.ctime, then you need to use something like:

TASK
FROM "Periodical"
WHERE !completed
GROUP BY file.name
SORT rows.file.ctime DESC
2reactions
awineckicommented, Jun 11, 2022

@mnvwvnm you’re absolutely right! Seems I’ve misunderstood 😅 . Anyway, your suggestion does exactly what I want, thank you! 😃. Perhaps it’ll help anyone bumping into this, too.

✌️

Read more comments on GitHub >

github_iconTop Results From Across the Web

Bug Types (Summary) - Test IO Academy
As soon as a content or a visual bug prevents a functionality, it should be reported as a functional bug, even though it...
Read more >
How to write a bug report effectively: examples and templates
Learn how to write bug reports effectively with this guide, including examples and templates. We've also included downloadable templates in ...
Read more >
File bug and feature reports effectively and easily
Often, people are reluctant to report bugs/issues because they simply aren't sure if what they're experiencing is a feature, user error, bug, or ......
Read more >
What Is A Bug Report & How To Create Them - BugHerd
A bug report is a specific report that outlines information about what is wrong and needs fixing with software or on a website....
Read more >
Why Bug Reports and Feature Requests Don't Overwhelm Us ...
After exploring a number of options and testing different approaches, the best solution was a simple and obvious one: prioritize at the front...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found