Created
September 14, 2023 19:48
-
-
Save typeoneerror/0e7bcd66aa62aaff1eb5e3fd820cda14 to your computer and use it in GitHub Desktop.
Display next incomplete task in Notion
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
lets( | |
/* Store unfinished actions */ | |
actions, prop("Actions").filter(current.prop("Status") != "Done"), | |
/* Sort by timestamp of task and store with id */ | |
actionId, | |
actions | |
.map(formatDate(current.prop("Date"), "X") + "-" + current.id()) | |
.sort() | |
.first() | |
.split("-") | |
.last(), | |
/* Explode stored id and find the task with that id */ | |
nextAction, | |
actions.find(current.id() == actionId), | |
nextAction + " " + nextAction.prop("Date") | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment