RAG - due date traffic light
Return a traffic light based on the current date and the due date of the work item.
🟢 - the work item is due in more than 2 weeks (14 days)
🟡 - the work item is due in more than one week (7days) but less than 2 weeks (14 days)
🔴 - the work item is due in less than a week or is overdue
Configuration
Create a Custom smart text fields and use the General parsing mode.
Expression
%{addDays({system.currentDateTime}, 14, RUN_AS_LOCAL)
< {issue.dueDate} ? "🟢" :
(addDays({system.currentDateTime}, 7, RUN_AS_LOCAL)
< {issue.dueDate} ? "🟡" :
"🔴") }

Used parser functions
The links lead to the JWTC documentation, as the Parser Expression is a shared function.