Skip repeating task?


#21

This seems to be working for at least one action. I don’t know why it wasn’t working in the past…I thought that it had failed under certain conditions—but perhaps I didn’t QA the issue properly. I think I can more reliably test it now on a bunch of different items set up the same way.

I am hopeful that this will work correctly and solve the problem for me. Thank you for outlining the setup procedure in such a clear and concise manner.


#22

I have similar requirement and just found one solution.
I have one “repeat every 1 week” action to exercise and due date is Friday. In fact, I usually do it on one day from Monday to Friday, this action is one reminder to do it. But sometimes I cannot get time to do it so this action just becomes overdue in red. Let us say the current due date is Mar 11 2016, the next due date is Mar 18 2016, now (Mar 12 2016) it is overdue. My solution is to change the current due date from Mar 11 to Mar 18, then the next due date automatically becomes Mar 25.


#23

Maybe I am missing something, or a change has been made to the software since March, but here is my 2 cents… When I have a repeating action (say every three days) that I don’t get done on an assigned day, I just bump the due date to the next assigned day I would normally do that action. This maintains the repeating pattern and doesn’t record completion for an action I didn’t do.


#24

Oh wait, that’s what the March post said! Guess I didn’t read carefully.


#25

I had been using the Skip Applescript by Ryan Davis mentioned above, but it recently stopped working. Anyone know why and how to fix it?


#26

Same here. Would love to have this back!


#27

Just found the fix on this thread. I had to change
set completed of aTask to true
to
mark complete aTask.


#28

Spoke too soon. While the script runs now without an error, it’s deleting the new task rather than the one that was completed. 😞


#30

In most cases, I mark the task as complete and then delete it.
The new task is created and actual done logs are accurate.


#31

Yes, that’s what the script does as well…at least it used to until recent updates.


#32

Yep, I tried writing a similar script a little while ago, and AFAICT, completing a repeating task generates a new completed task, and the original task becomes the next instance.

I’ve found a way around this, though it’s not super pretty. It relies on an apparent relationship between the ids of the repeating and the new, completed task—namely, that the completed task’s id is the original task’s id with an appended .0 (or .1, or .2, or so on, if those ids have already been generated for earlier repeats of the task).

My script generates the next instance of a repeating task by marking the repeating task as complete, then uncompleting the completed task and removing its repeat rule. This lets you change something about today’s copy of a task, without changing what will happen on future iterations. The script is a bit primitive right now, but it goes like this:

const document = Application("OmniFocus").defaultDocument

const repeatingTask = document.documentWindows[0].content.selectedTrees.value()[0]
repeatingTask.markComplete()

const tasks = document.flattenedTasks
const isRepeatOfId = id => id.startsWith(repeatingTask.id())
const currentTask = tasks.byId(tasks.id().filter(isRepeatOfId).sort().slice(-1)[0])
currentTask.markIncomplete()
currentTask.repetitionRule = null

You could implement the Skip script similarly, by changing the end of it:

const document = Application("OmniFocus").defaultDocument

const repeatingTask = document.documentWindows[0].content.selectedTrees.value()[0]
repeatingTask.markComplete()

const tasks = document.flattenedTasks
const isRepeatOfId = id => id.startsWith(repeatingTask.id())
const currentTask = tasks.byId(tasks.id().filter(isRepeatOfId).sort().slice(-1)[0])
currentTask.delete()

Or, you could use the first version of the script (if you want the flexibility), and manually delete today’s copy after running it.

Note that the script doesn’t have any kind of guardrails right now; be sure you have a task selected (in the main pane), and that it’s a repeating task. It will work on projects, but only if they’re selected in the main pane. And it will only touch the first selected task.


#33

Also, note one unfortunate thing about this script: it has to query OF for every task id in the database to do its magic. That’ll get slower as the database grows. My database is still fairly small, and it seems fast enough for me, but I’m curious if it becomes unmanageable at bigger sizes.