Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root


1 badge earned


Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!


Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.


Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!


Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
Community Members
Community Events
Community Groups

colour table row formatting depending on status macro

With the macro table transformer I would like to change the colour of the row of the table depending on the status that is set at the first cell of each row. 

2023-01-18 15_10_04-Kopie von Pendenzenübersicht - Martin Niederberger - Inside.png

For example: If the status is yellow with title "In Bearbeitung" then the entire row should be displayed in light yellow. If the status is red with title "Offen" then the entire row should be displayed in light red an so on...

What would be the sql query for this case?

Any help is highly appreciated!

1 comment

Hello @Katerina Rudkovskaya _Stiltsoft_ 

Thank you for your answer. I have already checked this site but didn't get further as there is no example for my use case (condition depending on status macro to colour the entire row). Since I am not experienced in SQL queries, I was hoping someone could help me with this case.

It seems that your case and the case in our documentation are alike. Statuses are considered as plain text for the conditions (it doesn't matter what color is the lozenge, only the title matters) and it also doesn't matter if you need to color one column or several - it is done separately column by column.

Maybe this example will make more sense:

SELECT T1.'Status',
FORMATWIKI("{cell:bgColor=" +
CASE WHEN T1.'Status' = "NEW" THEN "Red"
WHEN T1.'Status' = "OLD" THEN "Yellow"
ELSE "Grey"
+"}" + T1.'Output' + "{cell}")
AS 'Output',
FORMATWIKI("{cell:bgColor=" +
CASE WHEN T1.'Status' = "NEW" THEN "Red"
WHEN T1.'Status' = "OLD" THEN "Yellow"
ELSE "Grey"
+"}" + T1.'Comments' + "{cell}")
AS 'Comments'
From T1

Thu 4-1.png

Like # people like this

Thank you, that worked perfectly!

Like # people like this


Log in or Sign up to comment

Atlassian Community Events