Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Structure Formula to show Green when all requirements are marked In

Aditya Sastry
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
August 30, 2023

Hi,

I want to create a formula field and show "Pass" in green at feature level when all the requirements are marked as IN, "Pass" in yellow when some are marked IN and "Not Passed" in Red when all are marked OUT.

I have an IN/OUT checkbox field at requirement level.

My hierarchy is as below

Feature 1

Req 1

Req 2

Req 3

Req 4

Req 5

 

Feature 2

Req 1

Req 2

Below is how I would like to display in structure. Any help is appreciated.

structure ask.png

 

1 answer

1 accepted

0 votes
Answer accepted
Stepan Kholodov _Tempo_
Community Champion
August 31, 2023

Hello @Aditya Sastry 

You can try a formula like this:

if issuetype = "Feature":
with total_yes = sum#strict{field_name = "IN"}:
if total_yes = sum#strict{1}: "{color:green}Pass{color}" else
if total_yes = 0: "{color:red}Pass{color}" else
"{color:orange}Pass{color}"

The Format of the column should be set as Wiki Markup.

Best regards,
Stepan Kholodov
Tempo

Aditya Sastry
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
September 1, 2023

Thanks Stephan, It worked. few changes I need - If there are no linked issues (Requirement) with the Feature, it shouldn't show anything. Currently it is showing as "Pass", if there is no requirements associated. Also can you help in coloring the background as well.

Thanks again in advance for responding.

 

Regards,

Aditya

Stepan Kholodov _Tempo_
Community Champion
September 1, 2023

This should do it:

if issuetype = "Feature" and sum#strict{1}>0:
with total_yes = sum#strict{field_name = "IN"}:
if total_yes = sum#strict{1}: "{panel:bgColor=green}{color:white}Pass{color}{panel}" else
if total_yes = 0: "{panel:bgColor=red}{color:white}Pass{color}{panel}" else
"{panel:bgColor=orange}{color:white}Pass{color}{panel}"

I hope this helps. If you need further assistance with the formula or need help with anything else, please reach out to us directly at our support portal.

Best regards,
Stepan Kholodov
Tempo

Aditya Sastry
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
September 1, 2023

Sure Stephan. Thanks a lot for the help.

Like Stepan Kholodov _Tempo_ likes this

Suggest an answer

Log in or Sign up to answer