Skip to content

Commit

Permalink
use dailynote in vault at the same date in vikunja task created
Browse files Browse the repository at this point in the history
  • Loading branch information
Heiss committed Aug 1, 2024
1 parent d10e800 commit f07f6b6
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/processing/processor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -270,8 +270,12 @@ class Processor {
for (const task of tasksToPushToVault) {
let file: TFile;
const chosenFile = this.app.vault.getFileByPath(this.plugin.settings.chosenOutputFile);
// FIXME This should be the date of the vikunja created date, so the task is created in the correct daily note
const date = moment();
const formattedDate = task.created;
let date = moment();
if (formattedDate !== undefined) {
if (this.plugin.settings.debugging) console.log("Step CreateTask: Found formatted date", formattedDate, "using it as daily note");
date = moment(formattedDate, "YYYY-MM-DDTHH:mm:ss[Z]");
}
const dailies = getAllDailyNotes()

switch (this.plugin.settings.chooseOutputFile) {
Expand Down

0 comments on commit f07f6b6

Please sign in to comment.