Skip to content

feat: add support for Dataview tasks#209

Closed
8bitbuddhist wants to merge 8 commits intouphy:masterfrom
8bitbuddhist:dataview-support
Closed

feat: add support for Dataview tasks#209
8bitbuddhist wants to merge 8 commits intouphy:masterfrom
8bitbuddhist:dataview-support

Conversation

@8bitbuddhist
Copy link
Copy Markdown

This PR adds support for tasks formatted using Dataview. It supports [due:: YYYY-MM-DD] and [time:: HH:mm] fields. It also supports daily note links (e.g. [due:: [[2024-12-13]]]).

@uphy
Copy link
Copy Markdown
Owner

uphy commented Dec 24, 2024

ref: #147

@uphy
Copy link
Copy Markdown
Owner

uphy commented Dec 24, 2024

- [ ] task1 [due:: [[2025-01-01]]] [time:: 07:51]

It seems that this task title contains unexpected characters ]].

image

Comment on lines +17 to +35
get dateTrigger() {
return this.get("date-trigger", "due:: ");
}

get dateFormat() {
return this.get("date-format", "YYYY-MM-DD");
}

get timeTrigger() {
return this.get("time-trigger", "time:: ");
}

get timeFormat() {
return this.get("time-format", "HH:mm");
}

get linkDateToDailyNote() {
return this.get("link-date-to-daily-note", false);
}
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I couldn't find these settings from Dataview plugin.
Are these settings correct?

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If there are no such settings in Dataview plugin, I feel we need these settings in obsidian-reminder plugin.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

due is part of the shorthand syntax Dataview supports for tasks. I couldn't find a property built into Dataview specifically for tracking completion dates, but they use shorthand fields in their examples, so I think it's ok to include.

For time, there isn't a field like this in Dataview, but it's technically possible to track times using properties. I thought it would be better to include a time field as an option, but it might be better to wait until it's officially supported by the Tasks plugin first.

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for the explanation.

This code likely references my Kanban integration code. The original code retrieves the Kanban plugin's settings object and adjusts the reminder plugin's behavior to match the Kanban plugin.

However, this Dataview integration code references a setting that doesn't actually exist, so it always defaults and is meaningless.

image

As mentioned above, a new setting likely needs to be created for the obsidian-reminder plugin.

@uphy uphy added the enhancement New feature or request label Dec 24, 2024
@8bitbuddhist 8bitbuddhist marked this pull request as draft January 2, 2025 22:38
@8bitbuddhist 8bitbuddhist closed this by deleting the head repository Nov 23, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants