Forums

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

JIRA structure conditional formatting of column based on link type

Satender Singh
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
January 21, 2024

I would like to:

Add a formula using Wiki Markup, which show tickets which have a specific issue link type of 'Dependent', 'External Dependency' or BOTH. Then I wish to color the background of this cell based on the above 3 conditions.

I have this formula which work well for one link type:

with issuelinks_filter = issuelinks

.FILTER($.type = 'Dependent' AND $.source = this):

concat("{panel:borderStyle=solid|borderColor=white|bgColor=#ADFF2F}",issuelinks_filter,"{panel}")

Could someone please help me with multiple If statements using the above formula, to give different background colors in the structure column, based on link type? Thanks!

2 answers

1 accepted

1 vote
Answer accepted
Stepan Kholodov _Tempo_
Community Champion
January 22, 2024

Hello @Satender Singh 

If you want the formula to:

- show all linked issues with the 'Dependent' link type (when there are no linked issues with 'External Dependency' links) with background color1;
- show all linked issues with the 'External Dependency' link type (when there are no linked issues with 'Dependent' links) with background color2;
- show linked issues of both link types with background color3,

you can do it with a formula like this:

with abc = issuelinks.filter($.type = 'dependent' and $.source = this):
with def = issuelinks.filter($.type = 'external dependency' and $.source = this):

if abc and !def: concat("{panel:borderStyle=solid|borderColor=white|bgColor=#color1}",abc,"{panel}") else
if def and !abc: concat("{panel:borderStyle=solid|borderColor=white|bgColor=#color2}",def,"{panel}") else
if abc and def: concat("{panel:borderStyle=solid|borderColor=white|bgColor=#color3}",abc, ",", def,"{panel}")

I hope this helps. If you need further assistance or have other questions about Structure, please reach out to us directly at our support portal.

Best regards,
Stepan 
Tempo (the Structure app vendor)

Satender Singh
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
January 23, 2024

Thank you Stepan. This worked well and I could accomplish what was needed.

Like Stepan Kholodov _Tempo_ likes this
0 votes
Aswin Raj D
Community Champion
January 22, 2024

Dear @Satender Singh ,

Here's an example formula using Wiki Markup that should work for your scenario:

{panel:borderStyle=solid|borderColor=white|bgColor=
{if:$$isNotEmpty(issuelinks.FILTER($.type = 'Dependent' AND $.source = this))}#ADFF2F
{elseif:$$isNotEmpty(issuelinks.FILTER($.type = 'External Dependency' AND $.source = this))}#FFA07A
{elseif:$$isNotEmpty(issuelinks.FILTER($.type = 'Dependent' AND $.source = this) AND issuelinks.FILTER($.type = 'External Dependency' AND $.source = this))}#FFFF00
{else}#FFFFFF
{/if}
}


Please changes as per your need.

Suggest an answer

Log in or Sign up to answer