Don't lose relation to subtasks already in store
Signed-off-by: Raimund Schlüßler <raimund.schluessler@mailbox.org>
This commit is contained in:
parent
741af5a5e5
commit
944724e9ad
1 changed files with 8 additions and 0 deletions
|
@ -504,6 +504,14 @@ const actions = {
|
|||
return list
|
||||
}, parent.subTasks)
|
||||
|
||||
// In case we already have subtasks of this task in the store, add them as well.
|
||||
const subTasksInStore = context.getters.getTasksByParent(parent)
|
||||
subTasksInStore.forEach(
|
||||
subTask => {
|
||||
context.commit('addTaskToParent', { task: subTask, parent: parent })
|
||||
}
|
||||
)
|
||||
|
||||
// If necessary, add the tasks as subtasks to parent tasks already present in the store.
|
||||
if (!related) {
|
||||
const parentParent = context.getters.getTaskByUid(parent.related)
|
||||
|
|
Loading…
Reference in a new issue