Omnifocus template with calculated due dates

Let’s see if I can make this make any sense.

I have what I call a project template in Omnifocus (I use it on Mac and ios). It’s a sequential project of 30 tasks. For some of the tasks, I know the due date. Those due dates are based on the last task’s due date which I know as soon as I copy the template.

So task 30 is due on date T
Task 29 is T-1
Task 28 is T-2
Task 27 is T-2
Task 26 is T-3

I’m wondering if there is a way to have something like a fill-in form so that when I create the project, the due dates are also created based on the last task’s due date.

Thanks and I hope that makes sense!


1 Like

I’d suggest checking out this thread in the Omnigroup forums…

I’m currently using the Drafts / TaskPaper templates approach mentioned there, although with the new Shortcuts actions in the recent versions of OmniFocus I’m considering switching to an all Shortcuts based approach that can take a template project from OmniFocus and use it to create a new project, plugging in the correct dates as it does so.

1 Like

I use Editorial for this. Starting with the final due date, I calculate deadlines for all the elements of a magazine I create. @macsparky covered this in his Omnifocus Field Guide.

In a nutshell, I tap a button in Editorial and it runs the script. It asks me for <> and <>, which are the two variables. (There’s a portion of the script below so you can see how it works.)

The script first creates a project based on the number of the magazine issue (Volume 6 Issue 5 Prep, for example) and gives it the context “Mag Editorial.”

All sub-tasks are deferred or due based on the final due date. The first task “Turn in Magazine Files” is set on the final due date. I don’t defer that one, so it’s always visible.

Other tasks are set to appear at various times. In general, I defer them until a day or two before they’re due. There are so many tasks, it’s overwhelming if I see them all. So for the task “Create Vol 6 Issue 5 Dummy,” I defer it until “due date - 23 days” and make it due on “due date - 20 days.”

The @MacSparky Field Guide is worth it for this alone.

«Magazine Issue» Prep @context(Mag Editorial) @project(«Magazine Issue»)

	Turn in Magazine Files @due(«date») @context(Mag Editorial)

	Create «Magazine Issue» dummy @defer(«date»-23d) @due(«date»-20d)

        Interview for Cover Story @due(«date»-12d) @defer(«date»-15d) 
        Write Cover Story @due(«date»-6d) @defer(«date»-12d)

1 Like

Thank you both. This helps a lot. I watched @RosemaryOrchard’s video from @RogerDowning’s link. So I’ve got some configuring to do but I think I’m capable of doing something here.

If I’m capable, anyone is!

1 Like

Not sure if OP is looking for iOS-only solutions or is open to macOS, but by far the easiest template scheme for me is using Chris Suave’s AppleScript with OF on the Mac. I use these with relative due dates almost every day for templates both simple and complex.

iOS shortcuts are too fiddly for me. In addition, I have both iOS 12 and 13 devices, so Shortcuts don’t play well together.

Thanks. I will check this out too as I’m more apt to use MacOS.

Editorial is available on MacOS, as well, if you decide that way is easier.

are you sure? AFAIK is Editorial is iOS only.

Oops – nope, you’re right. Editorial is iOS-only.

I think I used TaskPaper on the Mac for the same scripts (since Editorial is really just creating a TaskPaper-formatted file). TaskPaper is available in Setapp, by the way. (I just learned this when I hopped onto my Mac to figure out what I was mis-remembering about this whole process.

1 Like

I have put together a Shortcut (link below) that allows you to share a template project in the following format from OmniFocus and process it directly into a new project with date offsets replaced by actual values.

[t-n] is an offset defer date
[T-n] is an offset due date

The Shortcut prompts for

  • Project name for the new project
  • Due date to be used for date offset calculation
  • Whether to use this as the due date for the project itself
  • Template tasks to include in the final project
  • Target folder for the new project (you will need to configure the list of folders in a list at the top of the shortcut)

The Shortcut is designed to be run by sharing the template project from within OmniFocus using the share sheet and selecting the shortcut. Note that is important to share the project, not an individual task, although the shortcut will detect this and flag an error.

You can also run the shortcut from within the Shortcuts app and it will use a built in test project, but please be aware the shortcut will crash if run from inside the Shortcuts editor due to a bug with the Choose From List action when the Select Multiple option is enabled.

The Shortcut will preserve tags, flags, durations and notes from the template in the resultant new project.