Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Completing a recurring task setting wrong status for new task [if the next custom status is not TODO] #2304

Closed
3 of 7 tasks
jwsteens opened this issue Sep 27, 2023 · 10 comments
Labels
scope: recurrence Anything to do with recurring/repeating tasks scope: task states Requests relating to custom task states, like 'in-progress', for example, and state transitions type: bug Something isn't working

Comments

@jwsteens
Copy link

jwsteens commented Sep 27, 2023

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

  • I searched previous Bug Reports didn't find any similar reports.

Expected Behavior

When completing a recurring task, a new task will be made and the status of this new task will be set to type TODO.

image

Current behaviour

image

Steps to reproduce

  1. Set task statuses as follows:
    image
    This is how it makes sense for me. Clicking once completes the task, clicking again cancels it. Clicking a third time "resets" it to To-do. Cancelled tasks are striked through, completed tasks are not.

  2. Create a recurring task (copy and paste):
    - [ ] Cook potatoes 🔁 every day 📅 2023-09-29

  3. Complete the task by clicking the checkbox.

  4. The original task will be finished and the newly created task will be cancelled.

Which Operating Systems are you using?

  • Android
  • iPhone/iPad
  • Linux
  • macOS
  • Windows

Obsidian Version

1.4.14

Tasks Plugin Version

5.8.1

Checks

  • I have tried it with all other plugins disabled and the error still occurs

Possible solution

In my case, my "toggle sequence" is:
Not done [ ] => Done [*] => Cancelled [x]

It seems that the new task takes the next status from the sequence, starting from the new status of the original task. I suggest instead taking the status before the new status.

This might not work for all users, so an alternative is to instead proceed through the sequence, until a status is found with type TODO.

@jwsteens jwsteens added the type: bug Something isn't working label Sep 27, 2023
@claremacrae
Copy link
Collaborator

Thanks for using Tasks.

There is content in your screenshots that is not provided as text for me to copy, so for reasons explained in the following post, I am unable to investigate:

https://publish.obsidian.md/tasks/Support+and+Help/Report+a+Bug

If you can provide full text, and full numbered steps for a reproduction, as per the above, I will willingly have a look when I have time.

Thank you.

@claremacrae claremacrae added scope: recurrence Anything to do with recurring/repeating tasks question Further information is requested labels Sep 27, 2023
@claremacrae
Copy link
Collaborator

@jwsteens Hi, I just want to make sure that you've seen the question above...

@jwsteens
Copy link
Author

@claremacrae Hello Clare, sorry for my delay. I have edited my original post, hope this helps.

@claremacrae
Copy link
Collaborator

Thank you very much, I've been able to reproduce it now.

Please could you have a read of this:

I suspect that you have used the same unusual cycle of statuses. Could you kindly confirm please?

@claremacrae claremacrae added the question Further information is requested label Sep 29, 2023
@claremacrae
Copy link
Collaborator

Here is a zipped copy of the Tasks settings for the custom statuses shown above, to save having to recreate them manually every time this is looked at:

data.json.zip

@jwsteens
Copy link
Author

I believe the person from the other thread has a similar "cycle" as I do, but he has a different intention. He says that when he wants to cancel a task, no recoccuring task should be created. When I cancel the task, I do want a reoccuring task to be created. So far, that is already happening. I believe I am not requesting a feature request here.

The problem I have is that when I either finish or cancel a task, the new reoccurence will be cancelled, as the next status will be assumed.

Like the other person said, no one wants a reoccuring task (which is newly created after finishing or cancelling the current task) to have a status other than TODO.
I believe that no person has a status cycle that does not loop back to some TODO status eventually. If you have a task which is finished and you click the checkmark again, I think everyone wants it to be set back to TODO? I must say I am not an "advanced" user of this plugin, as in, I don't use 20 different statuses. So I can't say that this is the case for certain, of course.

If this is the case, however, I think it would suffice to keep "cycling" the status of the new reoccurence until it has a TODO status, whichever symbol may be connected to this.

If this does end up annoying people, perhaps a "default TODO status" setting would work? Users can set which (custom) status new tasks should have.

As obsidian by default only differentiates between three checkbox states (empty checkbox, checkbox checked but text not striked through and checkbox checked and text striked through) it makes sense to me to use only three statuses. I would like to flip to any of these three states by clicking two times at most. Kind of like a flashlight which has two power settings and an off setting.

I hope I am making some sense...

@claremacrae claremacrae changed the title Completing a recurring task setting wrong status for new task Completing a recurring task setting wrong status for new task [if the next custom status is not TODO] Sep 30, 2023
@claremacrae
Copy link
Collaborator

@jwsteens Many thanks for the reply. There's a lot unpack there, so I gave the following headings!

Same requests?

I believe the person from the other thread has a similar "cycle" as I do, but he has a different intention. He says that when he wants to cancel a task, no recoccuring task should be created. When I cancel the task, I do want a reoccuring task to be created. So far, that is already happening.

That's a shame. Thanks very much for checking.

The Tasks custom status and recurrence code was designed to work with recurring tasks where the user's custom statuses are loops, like in these two examples in the docs:

So as I understand it, the only two users who have logged requests for changes in this area are both not using loops that go from DONE to TODO - but are asking for differing changes.

Bug or feature?

I believe I am not requesting a feature request here.

In a sense, it doesn't matter what we call it.

From your perspective, Tasks isn't doing what you want it to do. So I understand that it feels like a bug.

From my perspective, this issue is because Tasks is being used in a way it wasn't designed for, and the Tasks status code is behaving as designed, after careful thought and a month of development work and testing. So it's a feature request, because it's a request for a change from the designed behaviour.

Either way, the change is a non-trivial amount of work - coding, testing, documenting, and supporting the behaviour forever more.

Having recurrence make DONE always be followed by TODO

The problem I have is that when I either finish or cancel a task, the new reoccurence will be cancelled, as the next status will be assumed.

Like the other person said, no one wants a reoccuring task (which is newly created after finishing or cancelling the current task) to have a status other than TODO.

I do agree with that. It just never occurred to me that people would set up cycles where what followed DONE was not TODO.

no person has a status cycle that does not loop back to some

I believe that no person has a status cycle that does not loop back to some TODO status eventually. If you have a task which is finished and you click the checkmark again, I think everyone wants it to be set back to TODO? I must say I am not an "advanced" user of this plugin, as in, I don't use 20 different statuses. So I can't say that this is the case for certain, of course.

That situation is more frequent than the situation in this request.

Specifically, the most common thing is that users don't know that they need to set up custom statuses in the settings.

For example:

Changing the algorithm to detect next status

If this is the case, however, I think it would suffice to keep "cycling" the status of the new reoccurence until it has a TODO status, whichever symbol may be connected to this.

I have thought about that quite a lot, both with this request and with the one I linked to above.

It definitely seems appealing, as it would work for both the typical case of a standard loop, and your case of DONE not being followed by TODO.

I think it is more complicated than it seems. There are going to be corner cases to figure, like what happens when cycling the status of the new recurrence never reaches a TODO - in which case it would get stuck in an infinite loop.

If this does end up annoying people, perhaps a "default TODO status" setting would work? Users can set which (custom) status new tasks should have.

Is that one setting?
Or one setting on every custom status?
How would Tasks know when to use that new status?

Obsidian's 3 rendering options for checkboxes

As obsidian by default only differentiates between three checkbox states (empty checkbox, checkbox checked but text not striked through and checkbox checked and text striked through) it makes sense to me to use only three statuses. I would like to flip to any of these three states by clicking two times at most. Kind of like a flashlight which has two power settings and an off setting.

Huh, I never noticed that before.

## Checked

- [ ] space 🔁 every day ⏳ 2023-09-30

## Checked and struck out

- [x] x 🔁 every day ⏳ 2023-09-30
- [X] x 🔁 every day ⏳ 2023-09-30

## Checked, not struck out

- [-] hyphen 🔁 every day ⏳ 2023-09-30
- [y] y 🔁 every day ⏳ 2023-09-30
- [z] z 🔁 every day ⏳ 2023-09-30

Gives this:

image

What next

I hope I am making some sense...

Yes, I do now understand your request, and it is logical. Thanks for taking the time to explain it.

My concern is the amount of time it will take to implement and document, for what is a rare request.
There's already a lot of requests for new features and bug fixes...

I hope you understand.

@claremacrae claremacrae removed the question Further information is requested label Oct 2, 2023
@claremacrae
Copy link
Collaborator

If this is the case, however, I think it would suffice to keep "cycling" the status of the new reoccurence until it has a TODO status, whichever symbol may be connected to this.

A couple of people have suggested this.

However, I've been thinking about this, and I think that a new recurrence should be allowed to haves status type:

  • either TODO
  • or IN_PROGRESS

Specifically, it's the DONE and CANCELLED states that there is no value in using on a new recurrence...

@claremacrae claremacrae added the scope: task states Requests relating to custom task states, like 'in-progress', for example, and state transitions label Oct 30, 2023
claremacrae added a commit that referenced this issue Nov 6, 2023
So update the heading in the relevant docs page.

See #2304 (comment)
claremacrae added a commit that referenced this issue Nov 6, 2023
* feat: Add (empty for now) column 'Problems (if any)'

* feat: Report any empty status symbols in settings

* feat: Report any duplicate status symbols in settings

* feat: Report any unknown next status symbols in settings

* feat: Report DONE statuses whose next status type is a problem for recurrence

See #2089 and #2304

* feat: Add a gentle message for statuses with non-conventional type.

* refactor: . Unwrap else block, to reduce indentation.

* refactor: - Flip if and then unwrap else block, to reduce indentation.

* fix: Make punctuation consistent at end of messages.

* fix: Format values in messages, so that they stand out.

* fix: Correct the display of empty symbols.

They were rendered in Obsidian as ``

* refactor: . Flip if condition to reduce nesting.

* refactor: . Use early return to reduce nesting.

* docs: I've realised that recurring DONE to IN_PROGRESS is OK

So update the heading in the relevant docs page.

See #2304 (comment)

* feat: Add link to page 'Recurring Tasks and Custom Statuses'

* feat:
@claremacrae
Copy link
Collaborator

This has been fixed by #2516.

There's more work to be done before release, but it will be included in the next tasks release.

claremacrae added a commit that referenced this issue Dec 22, 2023
Completing a recurring task setting wrong status for new task [if the next custom status is not TODO]
@claremacrae
Copy link
Collaborator

Just to note that I'm updating the code for generating Mermaid status diagrams - as used in the "Check your Statuses" reports - to show any non-standard transitions for new recurrences of recurring tasks...

It will be shown like this:

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
scope: recurrence Anything to do with recurring/repeating tasks scope: task states Requests relating to custom task states, like 'in-progress', for example, and state transitions type: bug Something isn't working
Projects
Status: 🎉 Released
Development

No branches or pull requests

2 participants