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

Method getParentTasks

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

Source from the content-addressed store, hash-verified

1845 }
1846
1847 async getParentTasks(path: string): Promise<TaskInfo[]> {
1848 const task = await this.requireTask(path);
1849 const parents: TaskInfo[] = [];
1850
1851 for (const project of task.projects ?? []) {
1852 const parent = await this.resolveTaskReference(project, task.path);
1853 if (parent) parents.push(parent);
1854 }
1855
1856 return uniqueTasks(parents).map(copyTaskInfo);
1857 }
1858
1859 async getSubtasks(path: string): Promise<TaskInfo[]> {
1860 const task = await this.requireTask(path);

Callers 2

TaskNotesAPIClass · 0.95
getTaskRelationshipsMethod · 0.95

Calls 3

requireTaskMethod · 0.95
resolveTaskReferenceMethod · 0.95
uniqueTasksFunction · 0.85

Tested by

no test coverage detected