MCPcopy
hub / github.com/callumalpass/tasknotes / getTaskDependencies

Method getTaskDependencies

src/api/TaskNotesAPI.ts:1877–1894  ·  view source on GitHub ↗
(path: string)

Source from the content-addressed store, hash-verified

1875 }
1876
1877 async getTaskDependencies(path: string): Promise<ResolvedTaskDependency[]> {
1878 const task = await this.requireTask(path);
1879 const dependencies: ResolvedTaskDependency[] = [];
1880
1881 for (const dependency of task.blockedBy ?? []) {
1882 const dependencyPath = await this.resolveTaskReferencePath(dependency.uid, task.path);
1883 const blockingTask = dependencyPath
1884 ? await this.plugin.cacheManager.getTaskInfo(dependencyPath)
1885 : null;
1886 dependencies.push({
1887 dependency: copyTaskDependency(dependency),
1888 task: blockingTask ? copyTaskInfo(blockingTask) : null,
1889 path: blockingTask?.path ?? dependencyPath,
1890 });
1891 }
1892
1893 return dependencies;
1894 }
1895
1896 async getBlockingTasks(path: string): Promise<TaskInfo[]> {
1897 const task = await this.requireTask(path);

Callers 2

TaskNotesAPIClass · 0.95
getTaskRelationshipsMethod · 0.95

Calls 5

requireTaskMethod · 0.95
copyTaskDependencyFunction · 0.85
copyTaskInfoFunction · 0.85
getTaskInfoMethod · 0.65

Tested by

no test coverage detected