1
0

fix(kanban): move repeating task back to old bucket when moved to the done bucket

This commit is contained in:
kolaente 2024-07-12 13:44:45 +02:00
parent 51040cf1af
commit 323ecdaab6
No known key found for this signature in database
GPG Key ID: F40E70337AB24C9B
3 changed files with 8 additions and 4 deletions

View File

@ -40,11 +40,11 @@
</slot>
<input
:id="id"
ref="searchInput"
v-model="query"
type="text"
class="input"
:id="id"
:name="name"
:placeholder="placeholder"
:autocomplete="autocompleteEnabled ? undefined : 'off'"

View File

@ -71,7 +71,6 @@
trigger-icon="ellipsis-v"
@close="() => showSetLimitInput = false"
>
<div
v-if="showSetLimitInput"
class="field has-addons"
@ -523,6 +522,11 @@ async function updateTaskPosition(e) {
projectId: project.value.id,
}))
newTask.done = updatedTaskBucket.taskDone
if (updatedTaskBucket.bucketId !== newTask.bucketId) {
kanbanStore.removeTaskInBucket(newTask)
newTask.bucketId = updatedTaskBucket.bucketId
kanbanStore.addTaskToBucket(newTask)
}
kanbanStore.setTaskInBucket(newTask)
}

View File

@ -116,11 +116,12 @@ func (b *TaskBucket) Update(s *xorm.Session, a web.Auth) (err error) {
if view.DoneBucketID == b.BucketID {
doneChanged = true
task.Done = true
if task.RepeatAfter > 0 {
if task.isRepeating() {
oldTask := task
task.Done = false
updateDone(&oldTask, &task)
updateBucket = false
b.BucketID = oldTaskBucket.BucketID
}
}
@ -146,7 +147,6 @@ func (b *TaskBucket) Update(s *xorm.Session, a web.Auth) (err error) {
if err != nil {
return err
}
}
if updateBucket {