compute Task List State
Returns the worst NodeState that should be displayed for a TaskList containing the given tasks under the given priority.
"Expired and open" is what drives escalation; an open task counts as expired when either:
it has a
dueDatein the past (dueDate != null && dueDate <= now), orthe server scheduler already fired it (
expiredExecuted == true) — the recurring case, wheredueDatemay be null because the next fire time was computed from the cron expression and never persisted.
Tier rules:
no expired-and-open tasks:
NONEpriority is
HIGHand any expired-and-open task:SEVEREfixed-date overdue > 7 days:
SEVEREfixed-date overdue 1–7 days:
WARNotherwise (including recurring-only expiries without a dueDate):
INFO
Returns early at SEVERE since no other tier can supersede it.