mirror of
https://github.com/johannesjo/super-productivity.git
synced 2026-08-02 12:32:14 +00:00
Merge pull request #5361 from WPum/master-2
fix: backlog subtasks are not removed when removing a project
This commit is contained in:
commit
3a2abb53a7
1 changed files with 6 additions and 3 deletions
|
|
@ -193,15 +193,18 @@ export class ProjectService {
|
|||
.pipe(take(1))
|
||||
.toPromise();
|
||||
const subTaskIdsForProject: string[] = [];
|
||||
project.taskIds.forEach((id) => {
|
||||
const allParentTaskIds = [
|
||||
...project.taskIds,
|
||||
...project.backlogTaskIds,
|
||||
];
|
||||
allParentTaskIds.forEach((id) => {
|
||||
const task = getTaskById(id, taskState);
|
||||
if (task.projectId && task.subTaskIds.length > 0) {
|
||||
subTaskIdsForProject.push(...task.subTaskIds);
|
||||
}
|
||||
});
|
||||
const allTaskIds = [
|
||||
...project.taskIds,
|
||||
...project.backlogTaskIds,
|
||||
...allParentTaskIds,
|
||||
...subTaskIdsForProject,
|
||||
];
|
||||
this._store$.dispatch(TaskSharedActions.deleteProject({ project, allTaskIds }));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue