Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to set jira table's column width

Tags:

I struggled with this question for some time and was able to find the solution. The idea is that my script automatically generates a data, puts it into table and there are some columns that should preserve their width (should not be less then something). But jira markup sets table column width dynamically basing on screen resolution and data that is preserved in all the table columns. And noformat for data cells did not help me because there was some symbols in those columns that required jira markup. I am not jira admin so using advanced plugins and jira scripts is not an option.

like image 477
Artur Korobeynyk Avatar asked Dec 02 '16 09:12

Artur Korobeynyk


1 Answers

Solution was to set the table headers names with noformat. If you need a wider table, just add some spaces to the header and wrap it in noformat. And jira will keep the column width basing on that preformatted header.

So example would be:

||{noformat}Header1  {noformat}||Header2||{noformat} Header3          {noformat}||Header4|| |data1|data2|data3|data4| .... 

In this example the width of columns with header2 and header4 will be generated dynamically depending on which's content is longer (the column width could be even set dynamically to 1 symbol). While width of header1 and header3 will never be smaller then the length of the column name.

This solution does not allow to set the width of the column, but at least it allows to make some columns to be wide enough to show data correctly.

like image 191
Artur Korobeynyk Avatar answered Nov 06 '22 03:11

Artur Korobeynyk