MCPcopy Index your code
hub / github.com/callumalpass/tasknotes / toggleTaskStatus

Method toggleTaskStatus

src/main.ts:1168–1183  ·  view source on GitHub ↗
(task: TaskInfo)

Source from the content-addressed store, hash-verified

1166 }
1167
1168 async toggleTaskStatus(task: TaskInfo): Promise<TaskInfo> {
1169 try {
1170 const updatedTask = await this.taskService.toggleStatus(task);
1171 const statusConfig = this.statusManager.getStatusConfig(updatedTask.status);
1172 new Notice(`Task marked as '${statusConfig?.label || updatedTask.status}'`);
1173 return updatedTask;
1174 } catch (error) {
1175 tasknotesLogger.error("Failed to toggle task status:", {
1176 category: "persistence",
1177 operation: "toggle-task-status",
1178 error: error,
1179 });
1180 new Notice("Failed to update task status");
1181 throw error;
1182 }
1183 }
1184
1185 openTaskCreationModal(prePopulatedValues?: Partial<TaskInfo>) {
1186 new TaskCreationModal(this.app, this, {

Callers 2

handleToggleStatusFunction · 0.80
handleToggleStatusMethod · 0.80

Calls 3

errorMethod · 0.80
getStatusConfigMethod · 0.65
toggleStatusMethod · 0.45

Tested by

no test coverage detected