Created
September 20, 2023 16:09
-
-
Save typeoneerror/149c4e5093d9a91526c37371a40945c5 to your computer and use it in GitHub Desktop.
Next Action in a Project
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(!["Done", "Archive"].includes(current.prop("Status"))), | |
/* 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), | |
/* Final line determines the display */ | |
nextAction + " " + nextAction.prop("Date") | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment