[PR #2071] [MERGED] fix(frontend): prevent parent project field from jumping back when cleared #9751

Closed
opened 2026-04-23 09:11:37 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/go-vikunja/vikunja/pull/2071
Author: @kolaente
Created: 1/8/2026
Status: Merged
Merged: 1/8/2026
Merged by: @kolaente

Base: mainHead: fix/2046-parent-project-clear


📝 Commits (3)

  • 6b95d1f fix(frontend): prevent parent project field from jumping back when cleared
  • 7542847 test: improve parent project clear test coverage
  • db5c6d8 fix(frontend): handle null project in TaskDetailView.changeProject

📊 Changes

4 files changed (+115 additions, -4 deletions)

View changed files

📝 frontend/src/components/tasks/partials/ProjectSearch.vue (+4 -2)
📝 frontend/src/views/project/settings/ProjectSettingsEdit.vue (+1 -1)
📝 frontend/src/views/tasks/TaskDetailView.vue (+4 -1)
frontend/tests/e2e/project/parent-project-clear.spec.ts (+106 -0)

📄 Description

Summary

  • Fixes the parent project field in project settings "jumping back" to the previous value after clearing
  • When clicking the X button to clear the field, the value would reappear even though internal state was cleared
  • This created a confusing UX where the UI showed a value but saving would still clear the parent project

Changes

  • ProjectSearch.vue: Emit null when clearing instead of a project object with id: 0, and reset local state to a fresh ProjectModel()
  • ProjectSettingsEdit.vue: Handle explicit null value by setting parentProjectId to 0
  • Added E2E test to verify the fix

Test plan

  • Manual testing with Playwright MCP
  • Run E2E tests: cd frontend && pnpm test:e2e --grep "Parent Project Clear"

Fixes #2046


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/go-vikunja/vikunja/pull/2071 **Author:** [@kolaente](https://github.com/kolaente) **Created:** 1/8/2026 **Status:** ✅ Merged **Merged:** 1/8/2026 **Merged by:** [@kolaente](https://github.com/kolaente) **Base:** `main` ← **Head:** `fix/2046-parent-project-clear` --- ### 📝 Commits (3) - [`6b95d1f`](https://github.com/go-vikunja/vikunja/commit/6b95d1fa8aa6c242a4c8ae1af5b36bf05b48297f) fix(frontend): prevent parent project field from jumping back when cleared - [`7542847`](https://github.com/go-vikunja/vikunja/commit/7542847022aa027d3c73fda5760029864ac273e2) test: improve parent project clear test coverage - [`db5c6d8`](https://github.com/go-vikunja/vikunja/commit/db5c6d85084d34b6840ed1e0c1847b95eece8eb1) fix(frontend): handle null project in TaskDetailView.changeProject ### 📊 Changes **4 files changed** (+115 additions, -4 deletions) <details> <summary>View changed files</summary> 📝 `frontend/src/components/tasks/partials/ProjectSearch.vue` (+4 -2) 📝 `frontend/src/views/project/settings/ProjectSettingsEdit.vue` (+1 -1) 📝 `frontend/src/views/tasks/TaskDetailView.vue` (+4 -1) ➕ `frontend/tests/e2e/project/parent-project-clear.spec.ts` (+106 -0) </details> ### 📄 Description ## Summary - Fixes the parent project field in project settings "jumping back" to the previous value after clearing - When clicking the X button to clear the field, the value would reappear even though internal state was cleared - This created a confusing UX where the UI showed a value but saving would still clear the parent project ## Changes - **ProjectSearch.vue**: Emit `null` when clearing instead of a project object with `id: 0`, and reset local state to a fresh `ProjectModel()` - **ProjectSettingsEdit.vue**: Handle explicit `null` value by setting `parentProjectId` to `0` - Added E2E test to verify the fix ## Test plan - [x] Manual testing with Playwright MCP - [ ] Run E2E tests: `cd frontend && pnpm test:e2e --grep "Parent Project Clear"` Fixes #2046 --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
GiteaMirror added the pull-request label 2026-04-23 09:11:37 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/vikunja#9751