Hi all, I’m afraid my task management system got broken due to a recent DV update.
I’m querying tasks formatted in this way: - [ ] test task [due:: 2022-10-17],
with following query:
WHERE (due = date(today)) AND !completed AND (due !=null)
Since a recent update, the above query shows all tasks, also ones which don’t have a date added to them. (E.g., [due:: 2022-10-20])
The weird thing is that the same query for overview tasks still works fine: WHERE (due < date(today))
Does anybody have an idea how I can fix this? I have practicall zero programming knowledge, just hacked the above together by trial and error and random forum posts
1 - For now I don’t noticed any issue with the last update, but in fact it’s related with dates;
2 - in your query you don’t need due !=null. You can reduce your commando to WHERE due = date(today) AND !completed
3 - do you have any due field in your files outside the tasks? for example, a due field at page level (in frontmatter or as inline field in the content)…
This is strange, I just arrived in the office and now it works just fine on both my office Windows PC and Macbook where I had the issue this morning. I can’t see anything that would have changed on my Macbook, no other plugin updates, no changes in the vault…
So it seems like it was a temporary glitch.
Thank you for your answer. To get back on your 3 points:
2. thank you for the suggestion, I’ll take it out. I initially used the (due !=null) for the WHERE (due < date(today)) query.
3. I do have some [due:: 2022-10-20] (with different dates) fields in bullet points, but that hasn’t interfered in the past.
I asked because tasks query have a particularity: it works simultaneously in task level and page level. When we write WHERE due = date(today), I’m not sure about the accuracy in the results, because if you use due:: outside tasks then we create a logical issue: it’s due related with the tasks or with the page? or both? In the case I think it works in both. That’s why the best advice is: use different keys for different levels of metadata.
If you run this query
maybe you will see tasks without due date, because there’re other things in the note content with the field due.