Skip to content

Set task form default to last project#538

Open
bborn wants to merge 2 commits intomainfrom
task/2540-set-task-form-default-to-last-project
Open

Set task form default to last project#538
bborn wants to merge 2 commits intomainfrom
task/2540-set-task-form-default-to-last-project

Conversation

@bborn
Copy link
Copy Markdown
Owner

@bborn bborn commented Apr 22, 2026

Summary

  • Add tests to verify that the new task form defaults to the last used project

Changes

  • Added TestNewFormModelDefaultsToLastUsedProject: Verifies form defaults to last used project
  • Added TestNewFormModelDefaultsToPersonalWithoutDatabase: Verifies form defaults to 'personal' when no database
  • Added TestNewFormModelLastUsedOverridesWorkingDir: Verifies last used project takes priority over working directory detection

Testing

  • All new tests pass
  • Full test suite passes

bborn added 2 commits April 22, 2026 06:44
- TestNewFormModelDefaultsToLastUsedProject: Verifies that when a last used
  project exists in the database, the form defaults to it
- TestNewFormModelDefaultsToPersonalWithoutDatabase: Verifies that when no
  database is available, the form defaults to 'personal'
- TestNewFormModelLastUsedOverridesWorkingDir: Verifies that last used project
  takes priority over working directory detection
UpdateTask now calls SetLastUsedProject when the project field is set,
ensuring that editing a task with a different project updates the last
used project preference. This fixes the issue where the new task form
was defaulting to 'personal' instead of the previously used project.

Also adds test TestUpdateTaskSavesLastProject to verify this behavior.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant