[PR #2524] [MERGED] fix(gantt): prevent date range reset on task update #5700

Closed
opened 2026-04-16 13:49:27 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/go-vikunja/vikunja/pull/2524
Author: @tink-bot
Created: 4/2/2026
Status: Merged
Merged: 4/5/2026
Merged by: @kolaente

Base: mainHead: fix-gantt-date-range-reset


📝 Commits (3)

  • 3fcc25d fix(gantt): use reactive date range in Flatpickr config to prevent reset on task update
  • b1a46eb test(gantt): add e2e test for date range preservation after task modal close
  • 78bd137 fix(gantt): preserve query parameters when closing task modal

📊 Changes

3 files changed (+29 additions, -3 deletions)

View changed files

📝 frontend/src/components/project/views/ProjectGantt.vue (+1 -3)
📝 frontend/src/composables/useRouteWithModal.ts (+3 -0)
📝 frontend/tests/e2e/project/project-view-gantt.spec.ts (+25 -0)

📄 Description

The Gantt view's Flatpickr date picker resets to the initial date range whenever a task is updated, because defaultDate in the Flatpickr config references a static snapshot captured at mount time instead of the current filter state.

Fixes #2462

Test plan

  • Open Gantt view, select a custom date range, then drag a task to change its dates -- the date picker should retain the custom range
  • Edit a task inline from the Gantt view -- the date picker should not reset
  • Refresh the page with a custom range in the URL -- the range should be restored correctly

🔄 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/2524 **Author:** [@tink-bot](https://github.com/tink-bot) **Created:** 4/2/2026 **Status:** ✅ Merged **Merged:** 4/5/2026 **Merged by:** [@kolaente](https://github.com/kolaente) **Base:** `main` ← **Head:** `fix-gantt-date-range-reset` --- ### 📝 Commits (3) - [`3fcc25d`](https://github.com/go-vikunja/vikunja/commit/3fcc25de268aa0d3ab3d68d7855860bb1caaf865) fix(gantt): use reactive date range in Flatpickr config to prevent reset on task update - [`b1a46eb`](https://github.com/go-vikunja/vikunja/commit/b1a46eb1aa6ff021d30974df4c154bd858ec0d93) test(gantt): add e2e test for date range preservation after task modal close - [`78bd137`](https://github.com/go-vikunja/vikunja/commit/78bd1378d0afe00393189f97bf9dc6b1588d4cde) fix(gantt): preserve query parameters when closing task modal ### 📊 Changes **3 files changed** (+29 additions, -3 deletions) <details> <summary>View changed files</summary> 📝 `frontend/src/components/project/views/ProjectGantt.vue` (+1 -3) 📝 `frontend/src/composables/useRouteWithModal.ts` (+3 -0) 📝 `frontend/tests/e2e/project/project-view-gantt.spec.ts` (+25 -0) </details> ### 📄 Description The Gantt view's Flatpickr date picker resets to the initial date range whenever a task is updated, because `defaultDate` in the Flatpickr config references a static snapshot captured at mount time instead of the current filter state. Fixes #2462 ## Test plan - Open Gantt view, select a custom date range, then drag a task to change its dates -- the date picker should retain the custom range - Edit a task inline from the Gantt view -- the date picker should not reset - Refresh the page with a custom range in the URL -- the range should be restored correctly --- <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-16 13:49:27 -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#5700