How do I change text color for a row by FORMATWIKI?

Kelly Chen August 1, 2022

I pulled out PIMS info from Jira and let it showed on Confluence. I want to change to text color to be grey for those PIMS which status is already closed.  

I've read some information on Advanced table cells formatting

It seems that I could use FOMATWIKI command for this case. However, there is no sample for changing text color for a row.  I want the table shows like below..

擷取.PNG

It will be much appreciated if someone could help me. Thank you.

1 answer

1 accepted

4 votes
Answer accepted
Alexey Mikhaylov _Stiltsoft_
Contributor
August 3, 2022

Hello Kelly,

When using Table Transformer (which is a macro from our Table Filter and Charts for Confluence app) you can use the following SQL query for the table as provided by you:

SELECT
FORMATWIKI("{cell:textColor=" + 'Color' + "}" + 'Keys' + "{cell}") AS 'Keys',
FORMATWIKI("{cell:textColor=" + 'Color' + "}" + 'Status' + "{cell}") AS 'Status',
FORMATWIKI("{cell:textColor=" + 'Color' + "}" + 'Created' + "{cell}") AS 'Created'
FROM
(SELECT *,
CASE
WHEN 'Status' = "Closed" THEN "lightgray"
ELSE "black"
END AS 'Color'
FROM T1)

Best regards,

Alexey

Kelly Chen August 4, 2022

It works!!!

Thank you, Alexey :)

Alexey Mikhaylov _Stiltsoft_
Contributor
August 4, 2022

Hello Kelly,

I am glad to hear it helps.

Best regards,

Alexey

Megan
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!
March 8, 2023

Hi Alexey,

Thanks for providing the solution - I would like to do something similar, but want to remain the Key or Summary part clickable (can direct to the link of the Jira ticket). Would you be able to help on this please?

 

Many thanks in advance! :)

Alexey Mikhaylov _Stiltsoft_
Contributor
March 10, 2023

Hello Megan,

You can use the query as above, just change pluses to commas for the parts you need to leave clickable, like in the line below:

FORMATWIKI("{cell:textColor=" , 'Color' , "}" , 'Key' , "{cell}") AS 'Key'

Like Megan likes this
Megan
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!
March 10, 2023

Hello Alexey, 

Much appreciated for your quick reply - thats very helpful and it works perfectly! :D

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events