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

Method getBlockingTasks

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

Source from the content-addressed store, hash-verified

1894 }
1895
1896 async getBlockingTasks(path: string): Promise<TaskInfo[]> {
1897 const task = await this.requireTask(path);
1898 const allTasks = await this.plugin.cacheManager.getAllTasks();
1899 const blocking: TaskInfo[] = [];
1900
1901 for (const candidate of allTasks) {
1902 if (candidate.path === task.path) continue;
1903 for (const dependency of candidate.blockedBy ?? []) {
1904 if (await this.taskReferenceMatches(dependency.uid, candidate.path, task.path)) {
1905 blocking.push(candidate);
1906 break;
1907 }
1908 }
1909 }
1910
1911 return uniqueTasks(blocking).map(copyTaskInfo);
1912 }
1913
1914 async getTaskRelationships(path: string): Promise<TaskNotesTaskRelationships> {
1915 const task = await this.requireTask(path);

Callers 2

TaskNotesAPIClass · 0.95
getTaskRelationshipsMethod · 0.95

Calls 4

requireTaskMethod · 0.95
taskReferenceMatchesMethod · 0.95
uniqueTasksFunction · 0.85
getAllTasksMethod · 0.45

Tested by

no test coverage detected