How to set jira table's column width - jira

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.

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.

Since noformat does not look very pretty, i got anonther solution here, which probably is the prettiest one (when you look at the result and not the markup):
I just created a transparent image with a size of 1x1px and inserted it in the column headers with the minimum size I wanted the columns to be. In order to make the header text vertically centered, I needed to insert it before and after the text. See the following example:
|| !transparent.png|width=300px, height=1px! Col1 !transparent.png|width=300px, height=1px! || Col2 || Col3 ||
|| Row header | Content of column 1 | Content of column 2 |

A lot of HTML non-breaking line spaces.. i.e.
so a header will contain code like this..
|| Field Description ||Reserved Field||
It's a bit icky but it works in shifting the centre and expanding the column width. sadly this is limited to other content too but a lot prettier than {noformat}. Doesn't allow fixed sizing but better than squashed columns
e.g.
Formatted table with better column width

Jira seems to expand the width of the right column to fit the contents, and this can squeeze the left column so that it doesn't fit it's contents.
A workaround for this particular issue is to restrict the width of content in the right column until the left column has enough width to render properly.
One way to do this is to enter new lines into the content.
|| Parameter || Meaning ||
| a term | A definition which contains
lines breaks.|

The {noformat} solution did not work for me and I don't have admin access to add a plugin, so I created a Chrome extension to set the minimum column width to 100 pixels. Kind of silly that it had to come to this but it gets the job done.
https://chrome.google.com/webstore/detail/jira-table-width-fixer/lgbgknkgpchdholdabagddphgaildolf/related

Brain-dead brain dead solution: fill header with underscores. The "noformat" trick was too ugly even for me, the didn't work, I don't have permissions (or I'm too lazy) to find/use/install a transparent jpg... So I just used underscores. Making the header text "space-less" ("dont_squish_me" instead of "dont squish me") prevents Jira from line wrapping.
|| build || dont_squish_me || really_long_field____________________________________ ||
| [22|http://jenkins/job/JOB/22] | 5:27:50 | some extra text that might wrap |
| [23|http://jenkins/job/JOB/23] | 4:19:22 | more wrappable |

I googled for invisible unicode character, which is not a space, thus JIRA won't trimm it. The first I found and copy pasted in visuell mode while editing the table header of a JIRA comment, did the magic and I could adjust the needed column width. (Although I had to replace my spaces in the text if there were any or any other whitespace characters which could make JIRA break my header into more lines.
This was the unicode character I used: https://www.compart.com/de/unicode/U+2800
(copy the text from the box)

You should place them all in the same table for the columns widths to be the same (do not provide any space tables); for example
||Table1Col1||Table1Col2||Table1Col1Comment|Table1Col2Comment|
||Table2Col1||Table2Col2||Table2Col1Comment|Table2Col2Comment|
Hoepfully this should work.

Related

How to append alpha characters in a spreadsheet (google sheets)?

I have a string: "region" in a cell. I would like to have a column automatically populate with:
regionA
regionB
regionC
regionD
I have found that by using "char(row(A65)" and then fill down I can auto populate alpha characters.
This works:
=concatenate(B12, char(row(A65)))
(b12 has the "region" string)
But when I do fill down it not only increments the A65 but also increments B12.
How do I have it only increment one part of this function?
I'm also open to other ways of doing this, anything that works.
If you add a $ before a part of the range, that part stays fixed or static.
So either
=concatenate(B$12, char(row(A65)))
or
=concatenate($B$12, char(row(A65)))
can be dragged down, and the B12 won't change. $B$12 could also be dragged sideways without changing.
Try:
=ARRAYFORMULA(B12&CHAR(SEQUENCE(4)+64))
The '4' will determine how many rows you are spilling down. Obviously this works up to 'Z'.
If you want to extend this further then try:
=ARRAYFORMULA(B12&REGEXEXTRACT(ADDRESS(1,SEQUENCE(100),4),"\D+"))
The '100' will determine the amount of rows you spill down.

How to delete empty cells and shift up in Google Sheets?

Is there a way to delete empty cells in a given range and shift the column up to the desired display as shown below? Closest I came was
=ARRAYFORMULA({A1:C1; TRANSPOSE(SPLIT(TRANSPOSE(QUERY(A2:C,,999^99)), " "))})
which removes empty cells, but splits the first names and surnames into separate cells, which I have not figured out how to avoid. Pfa a made-up sample of current and desired displays:
Current Display
Desired Display
I'm new at this, but I came up with a bit of a brute force method, which may help you.
={
{(A1:C1)};
{FILTER(A2:A100,A2:A100<>"");indirect("N1:N" & 100-counta(A2:A100))},
{FILTER(B2:B100,B2:B100<>"");indirect("N1:N" & 100-counta(B2:B100))},
{FILTER(C2:C100,C2:C100<>"");indirect("N1:N" & 100-counta(C2:C100))}}
Assuming your data block is in columns A1:C100, this formula filters blank cells from each individual column, and then pads each column with blank cells at the bottom, to make the three arrays equal in length/dimension.
Note that in "100-counta(...", the 100 is the expected maximum length of your data column.
This could be calculated, and must be the same for all three columns.
Note also that the first array is horizontal (ends with a semi-colon), followed by the three columns, stacked beside each other (ends with a comma).
Here is a working example.
https://docs.google.com/spreadsheets/d/1MGaqqGrkmIliuAzEqxPtdEVZXWPN2K5W7jFFM-ZnwgE/edit?usp=sharing
If I missed something you were trying to achieve, let me know.
Also, I'm sure that there is a more elegant way to do this, or one not requiring the use of a block of "reserved" blank cells, but I couldn't think of that at the moment.
Edit: The formula as follows also works. But you need to remember to set the "100" value to be equal to the number of rows in your data block, since we pad the columns with the necessary number of blanks rows, after removing the blank cells in each column.
={
{(A1:C1)};
{FILTER(A2:A,A2:A<>"");indirect("N1:N" & 100-counta(A2:A))},
{FILTER(B2:B,B2:B<>"");indirect("N1:N" & 100-counta(B2:B))},
{FILTER(C2:C,C2:C<>"");indirect("N1:N" & 100-counta(C2:C))}}

Highlight entries in a row that do not match (with multiple instances)

I am trying to create a highlight in my sheet that will allow me on a row by row basis to highlight the version numbers that do not match the master column. I also want the rule to ignore anything that is marked as N/A as it should not be considered.
e.g. column E houses the latest version v1.0.2, columns H-O list the versions available at various locations, two of them are still on v1.0.0. I want any that do not match the master version (outdated) to highlight.
How can I do this and have it apply to each row individually? So row 7 values are highlighted based on E7 but row 8 values are highlighted based on E8. These are not plain numerical values but include text.
So I have figured it out after a bit of messing around based on answers to similar questions. All using Conditional Formatting.
Make sure that each rule created has the correct range applied so only that section of the sheet is checked (in my case H6:O18).
This ensures that whatever rule I add, it only applies to that part of my sheet.
Custom formula "=$H6:$O6<>$E6"
To explain this, it looks at the range of data entries (From the H to O columns - starting with row 6) and compares it to (in my case) the master entry in column E to compare. Basically asking do the entries differ?
The $ symbols are included in front of the column values to mark them as unchanging. The row numbers do not have the $ symbol and so can change. Therefore it checks H6:O6 against E6, but will check H12:O12 against E12. Maintaining the column but not the row.
Additional rule added "Cell is empty"
This is set to not highlight - applied to the same range (H6:O18). This is placed above the previous rule to overrule it. Therefore any blank cells are not highlighted as different, they are ignored.
Additional rule: "Text is Exactly"
This is applied to the same range and ordered above the original rule to again overrule it. The text to check is "N/A". Again this is set to not highlight or alter anything. This ensures that entries marked N/A are ignored much like blank cells.
An extra addition I included was duplicating the first formula but changing the <> to = and changing the highlight to green. This highlights anything that matches while any differences are highlighted red. N/A or blank cells are ignored.
Example of highlighted cells + Formula

MS-Word-2010 cross reference of math. equations gap in paragraph

I created a word document in version 2010. The mathematical equations are described by a number and written as follow.
a= b/c Eq.4.5
Now if I use equation number in text to refer towards a= b/c Eq.4.5 with hyperlink then whole
equation is appearing in text (as shown before in mid of sentence).
After reading into several blogs, I redefine number with 'insert bookmark' option by only selecting number 'Eq.4.5'.
Now if I use this bookmark in text to refer towards Eq.4.5 with hyperlink then a gap is
appearing in text (as shown before in mid of sentence).
Please can someone guide me how to remove this gap from text? as manually I can remove it but in print or update of document it appears again and again. If I switch on 'Show/Hide' option, it look like with small arrows as follows.
--> --> --> --> Eq.4.5
It appears the bookmark counts the 'tab's before the number too. (As that is what the small arrows indicate.)
Try remaking the bookmark and making sure you only have the number selected (by for instance using shift + right arrow key)
This can be done by using a table and a caption. The table is needed to separate the equation from the caption.
Make a table with invisible lines that is 3 columns wide and 1 row.
Edit the properties of the table so that the total table width is 100% width, and the columns are each 10%, 80%, and 10% width.
Set the Valign to the cells to be middle.
Add the equation to the center cell of the table.
Click on the right cell of the table and add a caption. Since the equation is in a separate table cell, the equation will not be considered part of the caption. If the caption is added to the table itself instead of appearing in the cell, then just highlight the caption and drag it into the cell.
Center the equation in its cell and it will be centered in the page.
Right-align the equation number and it will be right-aligned to the page

Removing white space in a table

I am having an issue with too much white space. Here's a picture of my data fields with placeholders representing the largest digit count possible in them.
As you can see, after the last "P" the values escape the scope of the chart. While I could increase the size of the table as a whole (currently textwidth), that would be a poor design choice on my part. What I'm thinking is to utilize all of that wasted white space. I don't know what to do though.
When I have all single digit values, the table looks perfect. I want the increased number size to "consume" the white space before forcing the table out of it's defined bounds.
I was hoping using extracolsep with no arguments would remove whitespace, but it sadly does not.
try adding this command before your table;
\renewcommand{\tabcolsep}{1pt}
the default column separator width is 6pt inserted before and after column contents, but this will change that. Replace 1pt with whatever you need.

Resources