×

3rd-Party Plug-In: Change Next Due Repetition

OmniFocus has a unique way to deal with repeating tasks in that they only populate into the future once completed. This decreases clutter. However, the drawback is that changing the defer or due dates will affect all future iterations of the task. This plug-in will change a repeating task’s due date for the current instance without affecting the future versions of the task.

For example, you have a monthly repeating task that you normally complete on the 15th of the month, but it’s not really due until the 30th. This give you plenty of buffer time every month to complete the task. This month, you want to push the completion date to the 29th because you are traveling. If you just change the task (without this plugin) then next month you might get surprised with only one day until the due date.

To use this plug-in simply install, select a repeating task, then from the share sheet (iOS) or Automation menu (Mac) run the plugin "Change Due Date on Only Next Instance of Repeating Task.” It will ask for the date you want to change the due date to for the next/this version only. In the background, it will duplicate and complete the task, taking off repeat on the duplicate version. It also deletes the falsely completed task that wasn’t really done in case you use completed tasks for tracking/historical purposes.

Dave Maccaferri


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.


Video:

Return to: OmniFocus Plug-In Collection

Change Next Due Repetition
 

/*{ "author": "Dave Maccaferri", "targets": ["omnifocus"], "type": "action", "identifier": "com.dmactech.omnifocus.of.change-only-next-instance-of-repeating-task", "version": "1.1", "description": "This allows a due date change only to a repeating task when you want future due dates to remain fixed.", "label": "Change Due Date on Only Next Instance of Repeating Task", "mediumLabel": "Change Due for Next Instance", "paletteLabel": "Change Next Due", "image":"goforward.plus" }*/ (() => { const action = new PlugIn.Action(function(selection, sender) { //Get a new date to change the task to after duplication let today = new Date(new Date().setHours(0,0,0,0)) var tomorrow = new Date(today.setDate(today.getDate() + 1)) let dateInputField = new Form.Field.Date( "dateInput", null, null ) let inputForm = new Form() inputForm.addField(dateInputField) let formPrompt = "Enter a due date/time after today:" let buttonTitle = "Continue" var formPromise = inputForm.show(formPrompt, buttonTitle) inputForm.validate = function(formObject){ let dateInput = formObject.values["dateInput"] return ((dateInput && dateInput >= tomorrow) ? true:false) } formPromise.then(function(formObject){ let dateInput = formObject.values["dateInput"] console.log(dateInput) let duplicatedTasks = new Array() selection.tasks.forEach(function(task){ // confirm task is a repeating task if(task.repetitionRule !== null){ //Duplicate task let insertionLocation = task.containingProject if(insertionLocation === null){insertionLocation = inbox.ending} let dupTasks = duplicateTasks([task], insertionLocation) let dupTask = dupTasks[0] //take repeat off the original task and change the next due date task.repetitionRule = null task.dueDate = dateInput //current task marked complete to generate the future task. Then we need to delete the one that was never actually completed. dupTask.markComplete(); //Delete last completed (this could probably be done more efficiently) let last_task = flattenedTasks.reduce((a,b) => a.completionDate > b.completionDate ? a : b) if (last_task){deleteObject(last_task)} duplicatedTasks.push(dupTask.id.primaryKey) } }) if(duplicatedTasks.length > 0){ let idStr = duplicatedTasks.join(",") URL.fromString("omnifocus:///task/" + idStr).open() } }) formPromise.catch(function(error){ console.log("form cancelled", error.message) }) }); action.validate = function(selection, sender){ // validation code // selection options: tasks, projects, folders, tags return (selection.tasks.length > 0) }; return action; })();