Plug-In: Complete and Await Reply
This plug-in 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 plug-in 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
DISCLAIMER
Software and examples are provided by OMNI-AUTOMATION.COM on an "AS IS" basis. OMNI-AUTOMATION.COM MAKES NO WARRANTIES, EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION THE IMPLIED WARRANTIES OF NON - INFRINGEMENT, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, REGARDING THE OMNI-AUTOMATION.COM SOFTWARE OR ITS USE AND OPERATION ALONE OR IN COMBINATION WITH YOUR PRODUCTS.
IN NO EVENT SHALL OMNI-AUTOMATION.COM BE LIABLE FOR ANY SPECIAL, INDIRECT, INCIDENTAL OR CONSEQUENTIAL DAMAGES ( INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION ) ARISING IN ANY WAY OUT OF THE USE, REPRODUCTION, MODIFICATION AND / OR DISTRIBUTION OF THE OMNI-AUTOMATION.COM SOFTWARE, HOWEVER CAUSED AND WHETHER UNDER THEORY OF CONTRACT, TORT ( INCLUDING NEGLIGENCE ), STRICT LIABILITY OR OTHERWISE, EVEN IF OMNI-AUTOMATION.COM HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Mention of third-party websites and products is for informational purposes only and constitutes neither an endorsement nor a recommendation. OMNI-AUTOMATION.COM assumes no responsibility with regard to the selection, performance or use of information or products found at third-party websites. OMNI-AUTOMATION.COM provides this only as a convenience to our users. OMNI-AUTOMATION.COM has not tested the information found on these sites and makes no representations regarding its accuracy or reliability. There are risks inherent in the use of any information or products found on the Internet, and OMNI-AUTOMATION.COM assumes no responsibility in this regard. Please understand that a third-party site is independent from OMNI-AUTOMATION.COM and that OMNI-AUTOMATION.COM has no control over the content on that website. Please contact the vendor for additional information.
Return to: OmniFocus Plug-In Collection
Complete and Await Reply
/*{
"author": "Rosemary Orchard",
"targets": ["omnifocus"],
"type": "action",
"identifier": "com.rosemaryorchard.omnifocus.complete-and-await-reply",
"version": "1.1",
"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",
"image": "clock.arrow.2.circlepath"
}*/
(() => {
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;
})();