fix: skip unknown status and priority on edit
This commit is contained in:
@@ -1,4 +1,3 @@
|
||||
import * as vscode from "vscode";
|
||||
import { listLocatedTasks } from "@/commands/listLocatedTasks";
|
||||
import { resolveTaskLocations } from "@/commands/resolveTaskLocations";
|
||||
import { Task } from "@/model/task";
|
||||
@@ -10,6 +9,7 @@ import {
|
||||
} from "@/model/taskStatus";
|
||||
import { IConfigProvider, ITaskRepository } from "@/ports";
|
||||
import { TASK_SCOPE_LABELS, TASK_STATUS_LABELS } from "@/ui/taskLabels";
|
||||
import * as vscode from "vscode";
|
||||
import { TaskTreeItem } from "./taskTreeItem";
|
||||
|
||||
class ScopeTreeItem extends vscode.TreeItem {
|
||||
@@ -119,7 +119,10 @@ export class TaskTreeProvider implements vscode.TreeDataProvider<vscode.TreeItem
|
||||
|
||||
private getStatusGroups(scope: ScopeTreeItem): vscode.TreeItem[] {
|
||||
const tasks = scope.locatedTasks.map((item) => item.task);
|
||||
return TASK_STATUS_ORDER.map((status) => {
|
||||
return TASK_STATUS_ORDER.filter((status) => {
|
||||
const groupTasks = tasks.filter((t) => t.status === status);
|
||||
return !(groupTasks.length === 0 && TASK_STATUS_META[status].fallback);
|
||||
}).map((status) => {
|
||||
const groupTasks = tasks.filter((t) => t.status === status);
|
||||
return new TaskGroupTreeItem(status, scope.location, groupTasks);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user