I'm trying to set up a Function column on a Structure view that will:
- For each sub-issue under a root issue, display Wiki Markup on whether it is on track, due soon, or overdue based on its Due Date (got this part working)
- For each root issue, display Wiki Markup on whether the sub-issue with the soonest due date is on track, due soon, or overdue (can't figure this part out)
Basically I want to roll up the most urgent due date's Wiki Markup to the root issue. Is this possible? Would love some sage wisdom.
Here's my Expr for part 1, and my most recent failed attempt at part 2, if it helps. The root issue type is Request, and its subtree is everything linked to that Request issue or its sub-issues by certain link types.
IF (issuetype != Request;
IF (dueDate < today(), "{color:red}OVERDUE{color}",
DAYS_BETWEEN(today(), DueDate) <= 14, "{color:blue}Due Soon{color}",
DAYS_BETWEEN(today(), DueDate) > 14, "{color:green}On Track{color}",
dueDate = undefined, "{color:orange}Needs Due Date{color}",
"{color:white}{color}"
)
)
or IF (issuetype = "Request ";
WITH x = MAX#subtree{due_date}:
IF (x, "{color:black}x{color}")
) Which is currently producing this:
