Confluence Data Center Question on Table Transformer Macro

Dolly Kirubavathi June 10, 2024

I have an attribute in Jira that is a multi-select text.  The values could range from 1 to several in that attribute. 

I am trying to show this attribute in the table transformer macro. Since the field is too long, it takes up the whole page for showing one row. Is there a better way to show it? may be like ... three dots and then when they click on it, show the entire text just like we have it in Jira list display?

1 answer

1 accepted

3 votes
Answer accepted
Stiltsoft support
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.
June 11, 2024

Hi @Dolly Kirubavathi ,

You may try the following workaround for the case:

Tue 1-1.png

Then you use this SQL query to create a tooltip for the 'Col 2' that you need to cut. The tooltip will contain all the original cell contents:

SELECT 'Col 1',
FORMATMARKDOWN("[" + 'Col 2' + "](# \""+ 'Col 2'+ "\")") AS 'New Col 2'
FROM T*

Then you go to the Stylesheet tab, set a specific cell width and make your cell contents look like text:

td a {
display: inline-block;
width: 40px;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;

color: inherit;
text-decoration: none;
//pointer-events: none;
cursor: default;
}

The result will be similar to your initial request:

Tue 1-2.png

Dolly Kirubavathi June 11, 2024

Thank you! Will try it out

Dolly Kirubavathi June 11, 2024

What is a stylesheet tab? I have changed my SQL query like the above. It is the second part I am not clear where I am supposed to do:

td a {
display: inline-block;
width: 40px;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;

color: inherit;
text-decoration: none;
//pointer-events: none;
cursor: default;
}

 

Please help!

 

Dolly Kirubavathi June 11, 2024

I am not the Admin. I don't have access to my space properties

 

Stiltsoft support
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.
June 11, 2024

It is just a tab inside the Table Transformer macro (the 6th tab on my screenshot: Presets, SQL query, ChatGPT and so on).

You need to paste the code there.

P.S. If you don't see the tab, it means that your version of the app is an outdated. You need to ask your Confluence administrator to update it.

The current version is 11.3.0.

 

Dolly Kirubavathi June 11, 2024

I see it and it works!

thank you!

Dolly Kirubavathi June 11, 2024

Question: It looks like my hyperlinks that are other fields in the table transformer macro no more work when I put in this code in the stylesheet tab. Is there a property I need to set or something?

Stiltsoft support
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.
June 12, 2024

Hi @Dolly Kirubavathi ,

Yes, the current styles are applied to the whole table, so if you have other links, they may be affected.

To make the styles work only for the specific column, you may use two options:

Option 1

td:nth-child(2) a {
display: inline-block;
width: 40px;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;

color: inherit;
text-decoration: none;
//pointer-events: none;
cursor: default;
}

Here the "2" index is a number of your column in the table. For my example, it is the second column in the table, so I have "2".

Option 2

td a[href="#"] {
display: inline-block;
width: 40px;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;

color: inherit;
text-decoration: none;
//pointer-events: none;
cursor: default;
}

Here we set an argument for the "a" class to find the links that we have set in the SQL query (there was a part "](# \""+ 'Col 2'+ "\")").

You may choose any option you like.

Dolly Kirubavathi June 12, 2024

Yes! it works! thank you!

Like Stiltsoft support likes this

Suggest an answer

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

Atlassian Community Events