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

Method cycleCurrentTaskPriority

src/main.ts:1677–1695  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1675 }
1676
1677 async cycleCurrentTaskPriority(): Promise<void> {
1678 try {
1679 const taskInfo = await this.getCurrentTaskForCommand();
1680 if (!taskInfo) {
1681 return;
1682 }
1683
1684 const currentPriority = taskInfo.priority || this.settings.defaultTaskPriority;
1685 const nextPriority = this.priorityManager.getNextPriority(currentPriority);
1686 await this.updateTaskProperty(taskInfo, "priority", nextPriority);
1687 } catch (error) {
1688 tasknotesLogger.error("Failed to cycle current task priority:", {
1689 category: "persistence",
1690 operation: "cycle-current-task-priority",
1691 error: error,
1692 });
1693 new Notice("Failed to cycle task priority");
1694 }
1695 }
1696
1697 private async getCurrentTaskForCommand(
1698 notTaskNotice = "Current file is not a task"

Calls 4

updateTaskPropertyMethod · 0.95
getNextPriorityMethod · 0.80
errorMethod · 0.80

Tested by

no test coverage detected