Skip to content

feat(tasks): allow changing a task's project from the detail sheet - #181

Open
paryanineil wants to merge 2 commits into
bwhtech:developfrom
paryanineil:feat/switch-task-project
Open

feat(tasks): allow changing a task's project from the detail sheet#181
paryanineil wants to merge 2 commits into
bwhtech:developfrom
paryanineil:feat/switch-task-project

Conversation

@paryanineil

@paryanineil paryanineil commented Jul 13, 2026

Copy link
Copy Markdown
Contributor

Summary

Adds a Project selector to the task detail sheet, so a task can be moved to a different project inline. Previously a task's project was fixed once it was created.

Project field in the task detail sheet

Behaviour

  • New Project field (a Hive Project link picker) near the top of the detail sheet, above Milestone.
  • Changing the project clears Milestone and Depends On — those reference records scoped to the previous project, and the backend doesn't auto-clear them, so leaving them set would point the task at a milestone/task from a different project.
  • The Milestone and Depends On pickers now filter by the currently selected project, so their options stay consistent after a switch.
  • Read-only for client users, consistent with the other fields.

Notes

  • Frontend-only. Reuses the existing LinkField component and the standard useFrappeUpdateDoc autosave path — no backend/API or DocType changes.
  • Assignees are intentionally left untouched (they're user-based via _assign, not project-scoped).

Testing

  • yarn build and ESLint clean on the changed file.
  • Verified in-browser: opened a task in one project, switched it to another via the new field — the change persisted and its milestone/depends-on were cleared (confirmed via the REST API).

paryanineil and others added 2 commits July 13, 2026 10:28
Adds a Project selector to the task detail sheet so a task can be moved
to a different project inline, instead of being fixed once created.

When the project changes, the Milestone and Depends On fields are cleared
because they reference records scoped to the previous project (the backend
does not auto-clear them, which would otherwise leave the task pointing at
a milestone / task from a different project). The Milestone and Depends On
pickers also now filter by the currently selected project so their options
stay consistent after a switch.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
The switch-project change adds a Project field that surfaces the project's
title in the detail sheet. The lock-due-date spec located the Due Date
field with `.grid.gap-2` filtered by `hasText: "Due Date"`, which now also
matches the Project field when a project's name contains "Due Date" (e.g.
the test fixture "E2E Lock Due Date"), causing a strict-mode violation.

Filter by an exact-text "Due Date" label instead, so the locator targets
only the Due Date field regardless of other fields' displayed content.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@paryanineil

Copy link
Copy Markdown
Contributor Author

Pushed a small follow-up commit that also touches e2e/tests/lock-due-date.spec.ts.

The new Project field surfaces the project's title in the detail sheet, and that spec located the Due Date field with .grid.gap-2 filtered by hasText: "Due Date". Because the test's fixture project is named "E2E Lock Due Date", the Project field's value now also matched that substring, so the locator resolved to two elements (strict-mode violation).

The fix targets the field by its exact "Due Date" label (filter({ has: page.getByText("Due Date", { exact: true }) })) instead of a substring, so it's robust to other fields' displayed content. Ran the full lock-due-date spec locally against this branch — all 6 pass.

(The other red E2E checks — project-types, task-pinning, and the tasks detail-sheet cases — are the pre-existing flakes that also fail on develop.)

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