Postponing projects according to their former date

Hi there,

I am new to the beautiful world of Omnifocus, but am really enjoying it!

So, I am using Omnifocus to get my cooking courses for young students done. So far, so good, but now I have been sick for one week. However, the whole course is, with the then correct dates, already set in Omnifocus. Is there any way to quickly add +1 week to every Action. If I mark all of them and then use the +1 week-button, they all just change to the next week’s date.
Is there any workaround to change this?

To make things more precise, that’s what I did:

Project “cooking course”
Minor projects underneath it, e.g. Beef Stew, Roast Chicken
Beef Stew has 5 tasks, 4 need to be done one day in advance, one has to be done on the date. This had to be done today, 2nd march.
As I am sick, I am postponing the whole course for one week, so beef Stew will be due on the 9th and 10th of March, and Roast Chicken now has to be done on the 17th and 17th of march.
By marking all projects and clicking +1, the date for ALL marked tasks change to the next week, so 9th or 10 th of march but not the week following the due date they were originally given.

This is kind of a bummer, as I right now need to go through my whole course and change this manually, which is way more time consuming…

Thanks a lot! :)

If you have OF Pro, here’s one of my favorite scripts, created by Curt Clifton and edited by Dan Byler. It allows you to defer start dates, due dates, or both a given number of days. Copy the following script:

-- To change settings, modify the following properties
property snoozeUnscheduledItems : true --if True, when deferring Start AND Due dates, will set start date to given # of days in the future
property showSummaryNotification : true --if true, will display success notifications
property defaultOffset : 1 --number of days to defer by default
property defaultStartTime : 8 --default time to use (in hours, 24-hr clock)

-- Don't change these
property alertItemNum : ""
property alertDayNum : ""
property allNotifications : {"General", "Error"}
property enabledNotifications : {"General", "Error"}
property iconApplication : ""

on main()
	tell application "OmniFocus"
		set will autosave of front document to false
		tell content of front document window of front document
			--Get selection
			set validSelectedItemsList to value of (selected trees where class of its value is not item and class of its value is not folder)
			set totalItems to count of validSelectedItemsList
			if totalItems is 0 then
			end if
			--User options
			display dialog "Defer for how many days (from existing)?" default answer defaultOffset buttons {"Cancel", "OK"} default button 2
			set daysOffset to (the text returned of the result) as integer
			set changeScopeQuery to display dialog "Modify start and due dates?" buttons {"Cancel", "Due Only", "Start and Due"} default button 3 with icon caution giving up after 60
			set changeScope to button returned of changeScopeQuery
			if changeScope is "Cancel" then
			else if changeScope is "Start and Due" then
				set modifyStartDate to true
			else if changeScope is "Due Only" then
				set modifyStartDate to false
			end if
			--Perform action
			set successTot to 0
			set todayStart to (current date) - (get time of (current date)) + (defaultStartTime * 3600)
			repeat with thisItem in validSelectedItemsList
				set succeeded to my defer(thisItem, daysOffset, modifyStartDate, todayStart)
				if succeeded then set successTot to successTot + 1
			end repeat
		end tell
		set will autosave of front document to true
	end tell
end main

on defer(selectedItem, daysOffset, modifyStartDate, todayStart)
	set success to false
	tell application "OmniFocus"
			if modifyStartDate then
				set theStartDate to defer date of selectedItem
				if (theStartDate is not missing value) then --There's a preexisting start date
					set defer date of selectedItem to my offsetDateByDays(theStartDate, daysOffset)
				end if
			end if
			set theDueDate to due date of selectedItem
			if (theDueDate is not missing value) then --There's a preexisting due date
				set due date of selectedItem to my offsetDateByDays(theDueDate, daysOffset)
			else if snoozeUnscheduledItems then
				if defer date of selectedItem is missing value then
					set test to my offsetDateByDays(todayStart, daysOffset)
					set defer date of selectedItem to my offsetDateByDays(todayStart, daysOffset)
				end if
			end if
			set success to true
		end try
	end tell
	return success
end defer

on offsetDateByDays(myDate, daysOffset)
	return myDate + (86400 * daysOffset)
end offsetDateByDays

on notify(alertName, alertTitle, alertText)
	display dialog alertText with icon 1
end notify


Then, open Spotlight on your Mac and search for Script Editor. Create a new script document. Paste the code above into it, and hit the hammer icon in the Script Editor toolbar to compile the script on your machine (make sure it has the right ingredients, essentially). If you see the text change from purple to black and colored, you’re doing it right!

If you get no errors, go back to OmniFocus and select all the tasks you want to modify. Back in Script Editor, hit the play button (triangle) in the toolbar. It will prompt you to set the number of days you want to defer the tasks, and then it will ask you to modify either start or due or both. Voilà!

You can save the script file anywhere on your machine to run it at any time by opening and pressing the play button. If you find it useful consider adding it to your OF toolbar. Omni Group CEO @kcase has some directions here.

1 Like