From a66fc3b82f0dc0464bf66095b203eec94e273e7f Mon Sep 17 00:00:00 2001 From: Kaitlin Salzke Date: Wed, 23 Feb 2022 20:38:18 +1100 Subject: [PATCH] fix: :bug: make projects active after creation even if destination is not a Project instance e.g. if destination is a .beginning, .ending, etc the project will not remain on-hold --- Templates.omnifocusjs/Resources/templateLibrary.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Templates.omnifocusjs/Resources/templateLibrary.js b/Templates.omnifocusjs/Resources/templateLibrary.js index ee413e1..c3b212b 100644 --- a/Templates.omnifocusjs/Resources/templateLibrary.js +++ b/Templates.omnifocusjs/Resources/templateLibrary.js @@ -106,7 +106,6 @@ if (destination instanceof Folder) { created = duplicateSections([template], destination)[0] project = created - project.status = Project.Status.Active // make status active if not already } else if (destination instanceof Project) { created = duplicateTasks([template.task], destination)[0] project = destination @@ -118,6 +117,8 @@ project = created } + if (created instanceof Project) created.status = Project.Status.Active // make status active if not already active + // ASK ABOUT OPTIONAL TASKS const optTasks = created.flattenedTasks.filter(task => task.note.includes('$OPTIONAL')) if (optTasks.length > 0) askAboutOptionalTasks(optTasks)