obsidian-tasks-group / obsidian-tasks

Task management for the Obsidian knowledge base.
https://publish.obsidian.md/tasks/
MIT License
2.49k stars 231 forks source link

Recurring tasks require due day for queries to work for ´today´ #1770

Closed Grant837 closed 1 year ago

Grant837 commented 1 year ago

Please check that this issue hasn't been reported before.

Expected Behavior

Currently, when entering a recurring task, no ´happens´ date entry is required. When making a query for Todays recurring event, the impled events should be listed when using queries such as:

is recurring
happens  today

Current behaviour

Queries using `happens today´ result in 0 occurrences, even when one or more recurring events happen that day.

Queries are only successful if a due, start, or scheduled date is explicitly entered when creating or editing the recurring event.

Steps to reproduce

Create a recurring task with the first occurrence including today, and with no explicit due, start or scheduled date run this query:

is recurring
happens  today

Which Operating Systems are you using?

Obsidian Version

1.1.16

Tasks Plugin Version

1.25

Checks

Possible solution

Either modify the code that simply having a recurring task implies at ´Happens´ event, or force include a due date when creating a recurring task (and the user has to decide to change it to starts or scheduled if so desired, and if nothing in entered give an error message that an explicit date is needed.

claremacrae commented 1 year ago

Hi @Grant837, thanks for using Tasks.


Expected Behavior

Currently, when entering a recurring task, no ´happens´ date entry is required.

This is true.

What it means is that a task that is recurring but has no happens date says:


When making a query for Todays recurring event, the impled events should be listed when using queries such as:

is recurring
happens  today

No, it would be wrong to change the behaviour of happens to add an implied today that is not present in the user's task.

It would be forcing all users of Tasks to accept a personal opinion about the meaning of a task with no dates.

That would create all sorts of confusions - and illogical, insistent search results.


Current behaviour

Queries using `happens today´ result in 0 occurrences, even when one or more recurring events happen that day.

Yes, that is the correct and intended behaviour, for reasons explained above.


How you can get the desired effect with the current behaviour

Here's how you can already make your queries have the behaviour you are requesting:

```tasks
is recurring
(happens today) OR (no happens date)
claremacrae commented 1 year ago

Summary: Closed as won't fix, as:

Grant837 commented 1 year ago

Hi Claremacrae, I appreciate the explanation.

So that I understand, what you are saying is that if I create recurring tasks for every Wed, and enter no date (matching the soonest Wed), that it means I do not care if I do it on Wed? I have to admit, I do not see the logic in that (yet).

I could understand your explanation if there was an option to have a recurring task without selecting a day of the week, but I can not find such an option.

Also, your query example does not achieve what I was trying to do, If I create recurring tasks for every Wed, starting this coming Wed. I do not want to see it in my ´Todays Task´ but I do, because it has no date (no happens date).

Thanks in advance for any explanation.
Grant

claremacrae commented 1 year ago

Wednesdays

So that I understand, what you are saying is that if I create recurring tasks for every Wed, and enter no date (matching the soonest Wed), that it means I do not care if I do it on Wed? I have to admit, I do not see the logic in that (yet).

No I am not saying that, because you didn't mention Wednesday anywhere earlier, so I have no idea where Wednesday came from, or what it is about your tasks that uses Wednesday, or how your Tasks lists are requesting Wednesdays.

I can only go by the information and examples that are supplied in the ticket.

Days of the week

I could understand your explanation if there was an option to have a recurring task without selecting a day of the week, but I can not find such an option.

There are lots of examples of recurrences without days of the week in the recurrences documentation, in the Examples section at the end:

https://obsidian-tasks-group.github.io/obsidian-tasks/getting-started/recurring-tasks/

How to do your goal

Also, your query example does not achieve what I was trying to do, If I create recurring tasks for every Wed, starting this coming Wed. I do not want to see it in my ´Todays Task´ but I do, because it has no date (no happens date).

Aahhh, thank you for explaining clearly what you are trying to do. That is very helpful.

You need to make your task look like this, where 2023-03-29 is the next Wednesday, as I write this.

- [ ] Something that needs to be done on Wednesdays 🔁 every week on Wednesday 📅 2023-03-29

And then your query could look like this:

```tasks
not done
due before tomorrow
```

If you might sometimes do one of the tasks late or miss a week

Add when done to the end of the recurrence rule so that if you are late completing the task one week, it sets the next due date in the future:

- [ ] Something that needs to be done on Wednesdays 🔁 every week on Wednesday when done 📅 2023-03-29
Grant837 commented 1 year ago

Hi,

Yeah, my double or triple bad. I was assuming that we are forced to indicate a day of the week, but after reading the manual (first bad, I had not read the recurring part in detail earlier), I saw the examples like ´every 3 days´ and also the ´when done´ option (2nd bad). These two made clear your approach and answer. I also saw that it was recommended to include an explicit date (my 3rd bad) in most cases.

In my defense, I depend on the pop-up utility to create my tasks, and none of this is obvious when ´learning by doing´ instead of reading the entire manual ;-)

However, I see the dilemma of the impossibility of informing the user of every possibility within a pop-up dialog, etc, but maybe adding some of those icons with a ´?´ for each entry field that links to the right place in the manual would be a possibility.

No worries. I can now see that this plugin might still work for my way of working. Thanks for helping me understand, and I hope maybe in the future I can offer a truly helpful idea how to improve this already good product!

Grant

claremacrae commented 1 year ago

Yeah, my double or triple bad.

Thank you for a reply that made me smile a lot!!

In my defense, I depend on the pop-up utility to create my tasks, and none of this is obvious when ´learning by doing´ instead of reading the entire manual ;-)

However, I see the dilemma of the impossibility of informing the user of every possibility within a pop-up dialog, etc, but maybe adding some of those icons with a ´?´ for each entry field that links to the right place in the manual would be a possibility.

Those are both very fair comments indeed! Thank you for a good and helpful, constructive suggestion.

No worries. I can now see that this plugin might still work for my way of working. Thanks for helping me understand, and I hope maybe in the future I can offer a truly helpful idea how to improve this already good product!

Delighted to hear it.

If you are stuck on something, you can always ask a question in Discussions/Q&A - or if you are the Obsidian Discord, there is a #task-management channel that has a number of people in it who are pretty familiar with tasks.

TriplEight commented 1 year ago

in case if someone finds it as I did, with the question: "I need to create a Tasks view with filter that would show only the recurring tasks that need to be done today".

Here's a solution:

First, you should create all the recurring tasks with a due date and with when done (worry not, when it's recreated, the due date is correctly moved).

I'm using this to remind me of dailies (worth adding tag includes #daily at the end) which I'll have any other day anyway.

```tasks
not done
is recurring
happens today

And this is in case you need to see those which you have missed the last time:

```tasks
not done
is recurring
(happens today) OR (happens before today)

This one ^ deals with all the Fridays, 3 days and every 21 of month recurring tasks.