mirror of
https://github.com/go-vikunja/vikunja.git
synced 2025-12-05 19:16:51 -06:00
[PR #1638] fix(kanban): repeating tasks dates won't update when moved in done bucket #1637
Reference in New Issue
Block a user
No description provided.
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/go-vikunja/vikunja/pull/1638
Author: @Biagio00
Created: 10/10/2025
Status: 🔄 Open
Base:
main← Head:main📝 Commits (4)
5ace321fix: repeating tasks don't update dates when moving in done bucket3a77b29better fix for kanban recurring task not updating without copier96e66d9added tests for dates update in repeating tasks when moved to done bucketd754599lint fix for previous commit📊 Changes
6 files changed (+40 additions, -10 deletions)
View changed files
📝
pkg/db/fixtures/tasks.yml(+4 -1)📝
pkg/models/kanban_task_bucket.go(+2 -2)📝
pkg/models/kanban_task_bucket_test.go(+19 -1)📝
pkg/models/task_collection_test.go(+11 -2)📝
pkg/models/tasks.go(+1 -1)📝
pkg/webtests/task_collection_test.go(+3 -3)📄 Description
This is my first pull request ever. Suggestions on how to do better are welcome :)
When moving a repeating task in done bucket it doesn't update start/due/end dates. In the code it seems that you were trying to create a copy of the task to be used as
oldTaskthat hasDoneset tofalse. Becausetaskis a pointer, doingoldTask.Done = falsechanges the done state intasktoo, causing theupdateDonefunction call to exit without changing dates.My fix just uses golang native deep copy that is enough for
updateDonecalculations that should not need any pointer-property of Task.Example with new behaviour:
Task configuration:

Task in kanban:

Task when moved to done column:

Because the task doesn't go back to the original bucket immediately (it sticks in the done bucket until refresh), picking it up again from the done bucket and releasing it there causes the dates to update again. This might be a thing to consider but i feel it's unrelated from the fix in this pull request.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.