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

Method toggleTaskArchive

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

Source from the content-addressed store, hash-verified

1149 }
1150
1151 async toggleTaskArchive(task: TaskInfo): Promise<TaskInfo> {
1152 try {
1153 const updatedTask = await this.taskService.toggleArchive(task);
1154 const action = updatedTask.archived ? "archived" : "unarchived";
1155 new Notice(`Task ${action}`);
1156 return updatedTask;
1157 } catch (error) {
1158 tasknotesLogger.error("Failed to toggle task archive:", {
1159 category: "persistence",
1160 operation: "toggle-task-archive",
1161 error: error,
1162 });
1163 new Notice("Failed to update task archive status");
1164 throw error;
1165 }
1166 }
1167
1168 async toggleTaskStatus(task: TaskInfo): Promise<TaskInfo> {
1169 try {

Callers 5

buildMenuMethod · 0.80
batchArchiveMethod · 0.80
buildActionsListMethod · 0.80
testTaskArchivingMethod · 0.80
testBulkTaskOperationMethod · 0.80

Calls 2

errorMethod · 0.80
toggleArchiveMethod · 0.45

Tested by

no test coverage detected