Open RonnyPfannschmidt opened 2 years ago
I believe I'm seeing this behaviour, and I suspect it's only noticeable when there are multiple potential matches for the determined filename.
This is the structure of my journal entries. When I open today's journal note 2022/06/19
, I get the entry from 2015/04/19
. Both have filename 19
but different paths.
When we are in openPeriodicNote we have a config (based on the type of note, eg daily) and it has a method on it config.getNote
. This will be passed the start of period (a Moment ts for the selected date) and the loaded array of all notes.
I didn't quite follow yet how TypeScript gets us through the next bit, but config.getNote
is a function getDailyNote
which uses getDateUID
to generate a unique-ish ID for each of the notes discovered and stored in the allNotes array Record (?), which is used to determine the filepath to open. And inspecting this I see that the record contains entries with the ts matching the most recently seen note of that day (eg 01
in the screenshot below), but file details matching the early note entries (2015/08/01
).
(the console.log is something I've inserted into the plugin inside function openPeriodicNote
above.)
It looks like the ID generator might be considering only the basename / filename and that having it consider the full path might fix this? Which I think might happen here:
... but I can't here map what I see in the source on Github to what I see happen inside Obsidian 😆
Via the Obsidian Discord I learned about the community plugin "BRAT" via which I updated to the 1.0.0-beta3 of Periodic Notes and this issue was resolved! NICE!
Thanks @liamcain
im using periodic notes, now ocnfigured for
GGGG/[W]WW/E
in aJournal
folderwhen i try t open the note for today (iso date
2022-01-04
i getJournal/2021/12/02
(note named after date not week/weekday) instead ofJournal/2022/W01/02
opened