How to color array values in Jira structure formula

NW September 30, 2023

In the Jira structure I have a field(column) with array of values - TeamA, TeamB, TeamC, TeamD, TeamE. One or more than one value can be selected for this field. I want to color the selections like TeamA in Red color, TeamB in Blue color and so on. If and else if is not working in the Jira structure formula. Please suggest. Thanks.

 

 

2 answers

1 accepted

1 vote
Answer accepted
Stepan Kholodov _Tempo_
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
October 2, 2023

Hello @NW 

You can try to use a formula like this:

with team1 = if search("team1", fieldname) : "{panel:bgColor=#ADFF2F}Team1{panel}":
with team2 = if search("team2", fieldname) : "{panel:bgColor=#FAD000}Team2{panel}":
with team3 = if search("team3", fieldname) : "{panel:bgColor=#E389B9}Team3{panel}":
with team4 = if search("team4", fieldname) : "{panel:bgColor=#14AAF5}Team4{panel}":
with team5 = if search("team5", fieldname) : "{panel:bgColor=#FF9933}Team5{panel}":


if fieldname: array(team1, team2, team3, team4, team5)

Where fieldname is the name of the field in question.

I hope this helps. If you need further assistance, please reach out to us directly at our support portal.

Best regards,
Stepan Kholodov
Tempo

NW October 2, 2023

It works! Thank you so much @Stepan Kholodov _Tempo_ . 

Like Stepan Kholodov _Tempo_ likes this
0 votes
Benjamin
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
September 30, 2023
NW October 1, 2023

Can you please help how to retrieve each value from an array using structure formula.

Suggest an answer

Log in or Sign up to answer