OmniFocus 4.7 plug-ins to convert Due or Defer dates to Planned dates

If you’re switching existing tasks to using the new Planned dates in the test builds of OmniFocus 4.7, you might be interested in these two very simple plug-ins which will convert Due or Defer dates to Planned dates for the currently selected tasks.


/*{
    "author": "Ken Case",
    "targets": ["omnifocus"],
    "type": "action",
    "identifier": "com.omnigroup.kcase.Due-Dates-to-Planned-Dates",
    "version": "0.1",
    "description": "Convert due dates to planned dates for all selected tasks",
    "label": "Due to Planned",
    "mediumLabel": "Due to Planned",
    "longLabel": "Due Dates to Planned Dates",
    "paletteLabel": "Due Dates to Planned Dates",
    "image": "signpost.right"
}*/
(() => {
    var action = new PlugIn.Action((selection) => {
        const tasks = selection.tasks;
        tasks.forEach(task => {
            if (task.dueDate) {
                console.log('Processing Task:', task.name);
                task.plannedDate = task.dueDate;
                task.dueDate = null;
            }
        });
    });

    return action;
})();

/*{
    "author": "Ken Case",
    "targets": ["omnifocus"],
    "type": "action",
    "identifier": "com.omnigroup.kcase.Defer-Dates-to-Planned-Dates",
    "version": "0.1",
    "description": "Convert defer dates to planned dates for all selected tasks",
    "label": "Defer to Planned",
    "mediumLabel": "Defer to Planned",
    "longLabel": "Defer Dates to Planned Dates",
    "paletteLabel": "Defer Dates to Planned Dates",
    "image": "signpost.right"
}*/
(() => {
    var action = new PlugIn.Action((selection) => {
        const tasks = selection.tasks;
        tasks.forEach(task => {
            if (task.deferDate) {
                console.log('Processing Task:', task.name);
                task.plannedDate = task.deferDate;
                task.deferDate = null;
            }
        });
    });

    return action;
})();
8 Likes