#998691 taskwarrior: loses tasks added when "task edit" was running

Package:
taskwarrior
Source:
task
Description:
feature-rich console based todo list manager
Submitter:
Jakub Wilk
Date:
2021-11-06 15:33:03 UTC
Severity:
normal
#998691#3
Date:
2021-11-06 15:30:09 UTC
From:
To:
I was "task edit"ing a task, but I got distracted, "task add"ed another
task, went back to the editor, saved and exited. Taskwarrior modified
the task I was editing, as expected, but it also lost the other task
I added. :-(

Here's how to reproduce it:

    $ task add foo
    Created task 1.

    $ EDITOR="sleep 1000; sed -i -e s/foo/FOO/" task edit foo &
    [1] 681
    Launching 'sleep 1000; sed -i -e s/foo/FOO/ "task.efd5dc74.task"' now...

    $ task add bar
    Created task 2.

    $ task

    ID Age   Description Urg
     1 12s   foo            0
     2  1s   bar            0

    2 tasks

    $ pkill sleep && fg
    Terminated
    EDITOR="sleep 1000; sed -i -e s/foo/FOO/" task edit foo
    Editing complete.
    Edits were detected.
    Description modified.

    $ task

    ID Age   Description Urg
     1 19s   FOO            0

    1 task
    Recently upgraded to 2.6.0. Please run 'task news' to read higlights about the new release.

Note that the "bar" task has disappeared.