blacksmithgu / obsidian-dataview

A data index and query language over Markdown files, for https://obsidian.md/.
https://blacksmithgu.github.io/obsidian-dataview/
MIT License
7.01k stars 411 forks source link

Task are not queries correctly (assuming due or scheduled date detection) #2039

Open Loradim opened 1 year ago

Loradim commented 1 year ago

What happened?

Hello there!

I have put my tasks into several notes to keep the tasks roughly together for the same project / topic.

However, in my dashboard, I want to query only the tasks for this week, unfortunately this is kind of unreliable since a few weeks (I recognized this behavior a few weeks ago - not sure if it was present before).

Example task:

- [ ] Test entry? ⌛️ 2023-09-07

Based on the query:

TASK
WHERE contains(text, "⛳") OR
      (scheduled <= date(today) AND scheduled != null) OR
      (due <= date(eow) AND due != null) OR
      (start <= date(today) AND start != null)
WHERE !completed

it should show up in the list, but doesn't. Now if I go back to my task, delete the date and type it in with the exact same characters, there is a good chance for it to show up:

- [ ] Test entry? ⌛ 2023-09-07

I just noticed (while pasting in here), the hour glasses are not the same. In Obsidian, they look identical, but when pasting here, they are different. Maybe a few more symbols needs to be added for detecting dates?

hourglass not working: ⌛️ hourglass working: ⌛

- [ ] Test entry not working via dataview tasks: ⌛️ 2023-09-07
- [ ] Test entry WORKING with dataview tasks: ⌛ 2023-09-07
image

The same did happen to me with the calendar symbols, but I'm not able to reproduce it right now.

Please let me know if you need any additional information.

Kind regards, Loradim

DQL

TASK
WHERE contains(text, "⛳") OR
      (scheduled <= date(today) AND scheduled != null) OR
      (due <= date(eow) AND due != null) OR
      (start <= date(today) AND start != null)
WHERE !completed

JS

No response

Dataview Version

0.5.56

Obsidian Version

Version 1.4.5 (Installer 1.1.16)

OS

MacOS

Loradim commented 1 year ago

Addition: I'm using the Emoji Toolbar plugin to access the calendar and hour glass "characters".

Version 0.4.1

AB1908 commented 1 year ago

Ah emoji parsing. See relevant comment: https://github.com/blacksmithgu/obsidian-dataview/issues/1502#issuecomment-1299590495

Loradim commented 1 year ago

Looking a bit more into it, I can say:

Gotta love Unicode

Anyway, this is very frustrating from a user point of view (though I'm sure it's frustrating from a developer point of view as well), as I can't be sure my tasks will pop up as expected (and I was overdue on at least two items due to this).

Is there any way to fix this or any workaround you can suggest?

Kind regards, Loradim

Loradim commented 1 year ago

I kind of found out, how I managed to produce the „wrong“ symbols… when working on my mobile phone, I made tasks including scheduled or due dates as well, using the iOS keyboard and their emoji search.

An emoji used this way would not get recognized in Dataview.

Maybe this is helpful in any way.

Kind regards, Loradim