Sequential projects: due date calculated on completion date of previous task

Hi @vegaz, @material-appearance, @nielsm,

I did some investigation and think there‘s a nice solution. Developed based on OF4.x on an iPad. Due to lack of a Mac I haven‘t tested it on Mac.

The plugin SetDynamicDeadlines (at the end of this post) should do what you asked for. What does it do? It looks at active sequential projects, looks at the last completed action‘s completion date and then checks if the succeeding remaining action has a statement like “3d”, “3d @9:30”, “5d @5:30p”, “tomorrow” or “2w” in the first line (2nd if the first line is empty) in its note. You should be able to use any duration supported by OF in its date fields! Specify it without any quotes like „“.

Based on completion date and duration of the note it sets the deadline of the action having the note.

Testing Safeguards
To make sure you can test it safely I built in a name check for the title of the sequential project it should work on. Currently, it just looks at sequential projects with a title starting with „TEST -„ and ignores the others. This is the portion of the code that does this and you may adapt it to your needs for testing.

let sequentialProjects = flattenedProjects.filter(project =>
project.sequential && // Only sequential projects
project.status == Project.Status.Active && // Only active projects (not on hold)
// ADAPT: For testing it looks only at sequential projects starting with “TEST -”
// Remove the following line and the && in the previous line if you are confident the plugin does what you want
project.name.startsWith(“TEST -”)
);

Extension Points
In the plugin code you find sections with the following comment (like shown in the previous paragraph): // ADAPT
This are extension points for you to make simple changes.

Specify a Deadline Time
My duration examples show it is optionally possible to specify the time of the deadline as in these cases:
3d @9:30
5d @5:30p
5d @17:30
In such cases the deadline takes the specified time.

Default Deadline Time
In cases you specified e.g. a duration in days like 5d, then the deadline is set to a default time. I‘ve not taken the effort to check for the default time in OF settings. When I looked at that some time ago I think it wasn‘t possible anyway. If you look out for the following ADAPT section you can set your default time for durations without hours and minutes:

// ADAPT:
// Set to 16:30:00:000 if no time can be derived because you just used e.g. 5d
// This uses military time. E.g. 4:30pm is 16:30 like written here as default
deadlineDate.setHours(16, 30, 0, 0);

How does this work when used in your day to day work?
You can call plugins installed to OF using an Apple Shortcut like this:

Then you update its settings like the following (Allow Running When Locked = on):

Then you create an automation in Apple Shortcuts triggered by time (like daily in the evening) and turn Automation = Run Immediately:

With that you have something that updates the deadlines based on your daily completions. Even if the device is locked, you don’t have to worry remembering running that Apple Shorcut anymore.

Please Perform further Tests
Though, I‘ve tested the due date calculations a lot, there may still be issues in the code for special project situations or deadlines. Therefore, please do some testing of your own and tell me if you find any issue.
SetDynamicDeadlines.omnifocusjs (4.1 KB)

2 Likes

Looks great, I cannot thank you enough…
I’m going to test it out

1 Like

What I like is it supports any form of a duration supported by OmniFocus (see Shared Classes & Methods: Date ‚Chapter 3 - Using Formatter Date Interpreters‘ with more examples).

It has no sequential action group support, yet. As of now it just looks at sequential projects (here with the title check mentioned above) and its direct actions.

The reason they probably haven’t is that OmniFocus is not a Project planning tool, it’s a task and workload manager. While dates are important in this for many people, that’s very much a project planning requirement.

If you’re managing your projects it’s easy to amend the date of the next required project manually. I would guess that it would add a significant amount of complexity to both the underlying application and the UI to accommodate this. When would the trigger fire to set the date of the next task? What happens if you insert another task between the two? What happens if the date now falls on a weekend??? It’s not as easy as you think it is.

1 Like

True and important, the trap being one can slip into using it thus.

Early this year I used OF4 to manage a major task in the family, starting out as a lot of ToDo items morphing into cross-related sequences. Reviewing afterwards, I decided to strip every apparent project out of OF, leaving cyclic and one-off tasks with simple sequences, or things which someday will be tasks or projects. Actual projects are in a dedicated tool, Kanban-style in my case.

1 Like

Hi,
sorry but I have to disagree. We are not talking here about multi-person projects, just standard sequential “old-style” projects, in which the existence of internal due dates is standard practice accepted by OF since its beginning. We are just discussing about a possible alternative way to express the due date of some actions in those sequential projects. It is perfectly possible that implementing such a feature would be too complicated, but IMHO the decision not to introduce it has nothing to do with the “personal productivity vs project management app” model…

It’s working! I’m starting to adapt it slightly to my needs, but it looks perfect.
A huge thanks!!

1 Like

@vegaz, I too was talking about standard “old style” projects with internal due dates in which I was the only primary actor, and as I noted I continue to use OF with those characteristics other than (personal) projects with more complexity such as multi-dependencies. On forums such as this I may describe my experiences in case they are helpful, not to subvert individual differences or preference. :)

And there we go, we both have opposing opinions.

But Omni will have product visions for both OmniFocus and OmniPlan. They may also have lines they’re not willing to cross between the two.

While the feature you’re asking for would no doubt be useful, is it part of the product vision for OmniFocus. Due to the minimal number of people who would likely use it, I doubt it is, and if you asked Omni, I suspect they’d point you at OmniPlan.