Open ilandikov opened 3 days ago
I don't fully understand.
Does it matter whether the Cancelled date is enabled or disabled in settings?
Does the problem occur in 7.9.0?
I wonder whether this is related to either of these:
I was unclear. There can be a relationship, but this is a different bug/behaviour.
I tried to clarify by adding examples in the description. Let me know if it is still unclear.
The cancelled date is enabled in the settings.
Thanks.
This is odd:
I asked about 7.9.0 in case I broke the code with the addition of the (disabled) date-picker button...
Fixed, thanks.
I will try 7.9.0 and keep you posted.
Edit Modal ignores cancel date
It does edit it under some circumstances.
... such as if I edit a task that is cancelled, and change the Cancelled date, the edit is preserved.
It does edit it under some circumstances.
Right, I found that the thing that exposes the bug is a status change from non-cancelled to cancelled.
That would be good to include in the Steps to Reproduce, ideally by giving a markdown line to edit, to avoid ambiguity when testing.
Done
Steps to reproduce
- Open Edit Task modal
- Set status to Cancelled (THIS IS THE IMPORTANT STEP, IF OMITTED, EVERYTHING WORKS FINE)
- Set cancelled date to any date than today's date
- Click Apply
I cannot reproduce the problem with following these steps, because Apply is disabled due to the empty description.
I generally request that users provide a Markdown line in a code-block that can be copied-and-pasted in to a markdown file, so we can copy that line, and know that we are always consistently starting the reproduction from the exact same point.
My bad, added additional info
Perfect. Thanks.
This is the code that enables manual edits to the Done date to be preserved by the Edit Task modal, if the user edits the Done date after changing the status:
Indeed, the workaround for the bug is to set the required Cancelled date in the modal's Done date field.
So the fix is going to be something like:
today
today
Please check that this issue hasn't been reported before.
Expected Behavior
In Edit Modal setting status to cancelled and setting canceled date to any non today's date and clicking Apply button should save the task with the input cancelled date.
Example:
today is 2024-09-01 I set status to cancelled, the cancelled date is 2024-09-01, I set the cancelled date to any other date -> the task is saved with 2024-09-01 as cancelled date
Current behaviour
In Edit Modal setting status to cancelled and canceled date to any non today's date and clicking Apply button saves the task with today's cancelled date.
Example:
today is 2024-09-01 I set status to cancelled, the cancelled date is 2024-09-01, I set the cancelled date to 2022-02-02 -> the task is saved with 2022-02-02 as cancelled date
Steps to reproduce
- [ ] #task todo
(Global filter is set to#task
)Which Operating Systems are you using?
Obsidian Version
1.7.1
Tasks Plugin Version
7.10.0
Checks
The cancelled date is enabled in the settings.
Possible solution
No response