Skip to content

Commit

Permalink
fix: 🐛 make projects active after creation even if destination is not…
Browse files Browse the repository at this point in the history
… a Project instance

e.g. if destination is a .beginning, .ending, etc the project will not remain on-hold
  • Loading branch information
ksalzke committed Feb 23, 2022
1 parent 0414c5a commit a66fc3b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Templates.omnifocusjs/Resources/templateLibrary.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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)
Expand Down

0 comments on commit a66fc3b

Please sign in to comment.