Skip to content

[Bug]: "Add subtask" button does not set the project before the folder is resolved #2347

Description

@iantierney

Bug Description

When you create a subtask Task from the Edit Task modal, {{project}} {{projectFolder}} aren't populated when you the new tasks folder get created,.

However
Right-click a task card > Create subtask pre-populates {projects: [parentLink]} before the modal opens, so {{project}} and {{projectFolder}} resolve correctly.

Steps to Reproduce

Edit task - Create Subtask

Set "Default task folder" to: {{projectFolder}}/{{project}}

  • Edit an existing "Parent" task.
  • Edit Task Modal opens.
  • Add subtask button.
    Resultant task is put in the vault route not the "Default task folder".

Right click/Create task - Create Subtask

  • Right click the same existing Parent task.
  • Create task modal opens.
  • Create a task and hit save.
    The resultant task is put in {{projectFolder}}/{{project}} as expected.

I would suggest having 3 different code paths for creating subtasks (and some different settings) create complexity and additional bug risk, with little benefit.
They are:

  1. Edit task
  2. Create Task/Right click
  3. Inline task

There may be more.
Ian

TaskNotes Debug Info


Affected Task Frontmatter

Relevant Bases File Content

Relevant Settings or Customizations

Default task folder: {{projectFolder}}/{{project}}

Console Errors or Logs


Screenshots or Screen Recording

No response

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions