Structure - issue status dependency, part 2

Иван Беляков
Contributor
September 1, 2021

Ok now I'm trying to set up structure to show overdue issues. Need several checks if one of them is if issue is done. Below is the formula. Everything works fine except the issue = done part (when issue is set to "Done" status - structure doesn't show "OK").

Would appreciate help.

Formula:

IF (dueDate < today(), "{color:red}Overdue{color}",
DAYS_BETWEEN(today(), DueDate) <= 2, "{color:orange}Due soon{color}",
DAYS_BETWEEN(today(), DueDate) > 2 OR Status = "Done", "{color:green}ОК{color}",
"{color:blue}No deadline set{color}")

1 answer

1 accepted

2 votes
Answer accepted
Dionathan Lopes {ALM Works}
Atlassian Partner
September 1, 2021

Hello @Иван Беляков 

Thank you once again for sharing your Structure Formulas question here on the Atlassian Community

 

In this case, you could try the below formula:

 

IF(
(dueDate < today() AND Status = "Done");
"{color:green}Done{color}";
IF(
(dueDate < today() AND Status = "In progress");
"{color:orange}In progress{color}";
IF(
(dueDate < today() AND Status = "To do");
"{color:red}Overdue{color}";
IF(
(DAYS_BETWEEN(today(), DueDate) <= 2);
"{color:orange}Due soon{color}";
IF(
(DAYS_BETWEEN(today(), DueDate) > 2 OR Status = "Done");
"{color:green}ОК{color}";
"{color:blue}No deadline set{color}")))))

 

You would also need to change the Format to "Wiki markup", by selecting it on the dropdown list right next to the "Options" field. Please refer to this article for more information - https://wiki.almworks.com/display/structure/Formulas

Please let us know how it goes.

Kind Regards,
Dionathan L
www.almworks.com 

Иван Беляков
Contributor
September 1, 2021

Hello. Thank you very much for the help, it worked. Although I changed it a bit so it looks like this now:

IF(
(Status = "Done");
"{color:green}Done{color}";
IF(
(dueDate < today());
"{color:red}Overdue{color}";
IF(
(DAYS_BETWEEN(today(), DueDate) <= 2);
"{color:orange}Due soon{color}";
IF(
(DAYS_BETWEEN(today(), DueDate) > 2);
"{color:green}ОК{color}";
"{color:blue}No deadline set{color}"))))

Like # people like this

Suggest an answer

Log in or Sign up to answer