Skip to content

[Bug]: Command: "TaskNotes: Convert current note to task" broke in last update (v4.3.0) #1469

@slipstyle

Description

@slipstyle

Bug Description

If I use the command/action "TaskNotes: Convert current note to task" from the command pallet, it no longer works correctly, after upgrading to v4.3.0.

The action will open the edit task modal, which has the defaults task properties set (I can see the default status and priority colours), however when saving the task, it reports via a notification "No changes to save".

If you change something in the edit task modal, like add a tag or details or change from the default status, then it will save correctly.

I was poking around and I think it may have something to do with changes made around this commit:
normenmueller@7bb1cce

I can't pin point the code responsible, I'm not familiar enough with this framework to fully understand... but it seems to me like the edit task modal is "loading" (creating) the task in memory from the original note, applying the defaults to it, and then is considering this initial task data as the "original task" (as far as the TaskEditModal is concerned), and hitting save runs the "is there any data to write" function(s), where it sees "nothing has changed" because its in memory version doesn't appear to be different, but the original task DIDN'T exist yet, it's only existing in memory...

In other words, the TaskEditModal thinks the task data it received to initialize the modal, is from an existing tasknote (on disk), when in reality, only the title and body/details existed before, the rest of the properties are new but not being recognized as new.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    Status

    No status

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions