Hi all,
I am looking to create an SLA reporter that formats the last comment column in JIRA structure view based on the current date and the last comment that was made.
So far. I can create a last comment view using the following code from that ALM works examples.
comments.UMAX_BY($.created).map(CONCAT( FORMAT_DATETIME($.created, "dd/MMM/YY"), " : ", $.author.user_display_name(), " - ", $.body))
Outputs this format.
<date> : @User - comments
I would like to modify the code above, and have tried to do this with "IF | CONCAT" statements interwoven into the code above, but all I seem to get are errors.
I would like to format the color of the date such that if the DAYS_BETWEEN(today(), $.created) >= 30, CONCAT("{color:darkorange}",FORMAT_DATETIME($.created, "dd/MMM/YY")
Below is one of my attempts.
comments.UMAX_BY($.created).map(if(DAYS_BETWEEN(today(), $.created) >= 30, CONCAT("{color:red}",FORMAT_DATETIME($.created, "dd/MMM/YY"),"{color}",
DAYS_BETWEEN(today(), $.created) >= 14, CONCAT("{color:darkorange}",FORMAT_DATETIME($.created, "dd/MMM/YY"),"{color}",
CONCAT(FORMAT_DATETIME($.created, "dd/MMM/YY"))))))
Any help would be much appreciated!