Forums

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

Conditional Formatting for Number of Jira Issues in Confluence Table

Sophie Ng
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!
July 28, 2022

Hi, 

I would like to insert a conditional formatting for the status of each project. So in the status column, i would like to fill the cell with a red color if the overdue tickets/total open tickets > 75% and green otherwise. 

image.png

I have tried using table transformer with the following code: 

SELECT *, FORMATWIKI("{cell:bgColor=" + CASE WHEN T1.'Overdue Tickets'/T1.'Total Open Tickets' >= "0.75" THEN "hex for red" ELSE "hex for green" END + "}") AS 'Status', FROM T1

However, I keep getting a parsing error as shown. This is my first time using confluence so any help would be greatly appreciated. thanks!

image.png

 

2 answers

4 votes
Nikita Kamai
Contributor
August 4, 2022

Hello, @Sophie Ng 

This is Nikita from Stiltsoft.

Please, try the following query:

SELECT *,
FORMATWIKI("{cell:bgColor=" + CASE WHEN T1.'Overdue Tickets'/T1.'Total Open Tickets' >= "0.75"
THEN "red" ELSE
"green" END + "}{cell}") AS 'Status'
FROM T1


0 votes
Benjamin
Community Champion
July 28, 2022

Hi @Sophie Ng ,

 

You may want to refer to this post to get some additional thoughts on handling your case.

 

https://community.atlassian.com/t5/Confluence-questions/Conditional-Formatting-for-Confluence-tables/qaq-p/1568284

Hope it helps.

 

-Ben

Katerina Kovriga {Stiltsoft}
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.
July 28, 2022

Hi @Sophie Ng ,

I see that you have an extra comma between AS 'Status', FROM T1 (and your mistake points at this abstract as well).

Unfortunately, I'm out of the office for the next 10 days - please go to our support team.

Like # people like this

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
STANDARD
TAGS
AUG Leaders

Atlassian Community Events