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

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

Avatar

1 badge earned

Collect

Participate in fun challenges

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

Challenges
Coins

Gift kudos to your peers

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

Recognition
Ribbon

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!

Leaderboard

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
4,456,509
Community Members
 
Community Events
176
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"
END
+"}" + T1.'Output' + "{cell}")
AS 'Output',
FORMATWIKI("{cell:bgColor=" +
CASE WHEN T1.'Status' = "NEW" THEN "Red"
WHEN T1.'Status' = "OLD" THEN "Yellow"
ELSE "Grey"
END
+"}" + T1.'Comments' + "{cell}")
AS 'Comments'
From T1

Thu 4-1.png

Like # people like this

Thank you, that worked perfectly!

Like # people like this

Comment

Log in or Sign up to comment
TAGS

Atlassian Community Events