×

Plug-In: Complete and Await Reply

This script is based on an AppleScript script for OmniFocus by Curt Clifton. It allows you to mark your currently selected task as complete, and duplicates the task with `Waiting on reply: ` prefixed to the original task name. This allows you to quickly complete a task (such as “Email Bob about his cat”) and also add the appropriate related action. This script does not add a waiting tag to the new task, but that could be added after line 19 with dupTasks[0].addTag(tagNamed('Waiting On')); (this assumes your tag is called “Waiting On” placed at the top-level of tags). — Rosemary Orchard

Complete and Await Reply
 

/*{ "author": "Rosemary Orchard", "targets": ["omnifocus"], "type": "action", "identifier": "com.rosemaryorchard.omnifocus.complete-and-await-reply", "version": "1.0", "description": "Mark the currently selected task as complete and add a new task to await the reply.", "label": "Complete and Await Reply", "mediumLabel": "Complete and Await Reply", "paletteLabel": "Complete and Await Reply", }*/ (() => { let action = new PlugIn.Action(function(selection) { let duplicatedTasks = new Array() selection.tasks.forEach(function(task){ insertionLocation = task.containingProject if(insertionLocation === null){insertionLocation = inbox.ending} dupTasks = duplicateTasks([task], insertionLocation) dupTasks[0].name = "Waiting on reply: " + task.name; duplicatedTasks.push(dupTasks[0].id.primaryKey); task.markComplete(); }); idStr = duplicatedTasks.join(",") URL.fromString("omnifocus:///task/" + idStr).open() }); action.validate = function(selection){ return (selection.tasks.length >= 1) }; return action; })();

Return to: OmniFocus Plug-In Collection