obsidian-dataview icon indicating copy to clipboard operation
obsidian-dataview copied to clipboard

queries with file.cday don't refresh on date rollover

Open pbienst opened this issue 2 years ago • 5 comments

What happened?

I have the query below in my dashboard, to list the files that were created today.

Two issues:

  1. When I leave Obsidian open overnight, in the morning the query still shows yesterday's results
  2. When I make a dummy edit to the query, it updates in live preview mode. However, switching to read mode, the query still shows yesterday's results

DQL

list
from "journal work" or "zettelkasten work" or "journal home/diary"
where file.cday = date(today)
sort file.name desc

JS

No response

Dataview Version

0.4.26

Obsidian Version

0.14.9

OS

Windows

pbienst avatar May 10 '22 07:05 pbienst

Does this persist on the latest beta? There is also a new refresh command from #998 that may help with this.

AB1908 avatar Jul 01 '22 13:07 AB1908

Yes, the refresh command in 5.38 does not work, just checked it this morning....

pbienst avatar Jul 01 '22 14:07 pbienst

I know too little of the plugin's structure to suggest anything so let's wait for blacksmithgu.

AB1908 avatar Jul 01 '22 14:07 AB1908

There is a surprisingly complicated reason for why the "Refresh" command does not work (that boils down to dates being resolved at query parse time rather than evaluation time); the fix is relatively easy, however, so I'll include this in the next release.

blacksmithgu avatar Jul 03 '22 22:07 blacksmithgu

Any updates on this easy fix? The latest releases still seem to have this problem... Thanks!

pbienst avatar Sep 22 '22 07:09 pbienst