All tips

Sync Notion parent-task dates with sub-task dates

If you're using Notion's sub-items feature, you might find the lack of cohesion between parent-items and sub-items somewhat frustrating. For instance, wouldn't it be convenient if the parent task's "date" property could automatically update based on the dates of its sub-tasks?

I attempted to solve this problem using formulas. Here's what I devised for the date example:

/* Differenciate parent-tasks from sub-tasks (+sub-tasks with empty due dates) */
if(or(empty(prop("Parent-task"))==false,empty((map(prop("Sub-tasks"),current.prop("Due"))).format().replaceAll(",",""))==true),prop("Due"),
/* Create the parent task range */
dateRange(map(
/* Get sub-tasks */
prop("Sub-tasks"),
/* Get sub-tasks due dates */
current.prop("Due").dateStart())
/* Sort dates in ascending order */
.sort()
/* Get the most recent date */
.first()
/* Get its start date */
.dateStart(),

/* Repeat for end date */
map(prop("Sub-tasks"), current.prop("Due").dateEnd()).sort().last().dateEnd())
)


This formula essentially generates a new date range for the parent tasks, using the earliest start date and the latest end date from all of its sub-tasks.

Notion change parent dates from sub dates

If you want to apply this formula to your own task manager, remember to name your properties as follows:

  • Parent task (relation) → "Parent-task"
  • Sub task (relation) → "Sub-tasks"
  • Date (date) → "Due"

Master Notion, 5 minutes a week

Want to be in the loop with everything Notion? Join the 15,000+ Notioneers on the #1 Notion-focused newsletter.
Every Tuesday, I’ll hit you up with an email, giving you 3 tips on how to make the most of Notion, 2 (awesome) resources, and 1 Tweet of the Week.

Latest issues