How to keep formatting when paste /import contents from excel in a Jira comment

Juan Du Toit
Contributor
February 4, 2019

Hi,

Is it possible to paste formatted cells from Excel, specifically colours, in the Wiki Style Comments? 

I saw this issue logged in Atlassian, but not sure if it also relates to Excel

https://jira.atlassian.com/browse/JRASERVER-65674?_ga=2.103574275.284729106.1549230436-433678232.1542939331

 

Is there any plugins for this functionality if it's currently not possible? 

Jira v7.11

 Regards,

Juan

1 answer

1 accepted

0 votes
Answer accepted
Earl McCutcheon
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
February 6, 2019

Hi Juan,

I just did a bit of testing on this one and it does look like the Text colors are stripped from Excel as well as the Google suite and Word when copied to the clipboard.

OpenOffice (Any Platform) And/OR Numbers(if your on MAC) preserve the text color formatting, where the Google and Office Suite are stripping various content when copied to the clipboard.

Regards,
Earl

Juan Du Toit
Contributor
February 6, 2019

Thanks for confirming Earl

Any idea if there is a plugin that can perform this functionality? 

Earl McCutcheon
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
February 7, 2019

Hi Juan,

I do not know for certain of a add-on that can do a copy and paste action in a Jira field to preserve formatting, but there are quite a few Excel add-ons for jira that can be found at the following marketplace link, and it would be worth taking a look to see if any have this option or possibly an embeddable spreadsheet option:

But the only testing I have ever performed was for importing and exporting issues from the issue navigator on a few different tools so I'm no expert on the use cases of these tools.

We do however have the following blog post that details how to add in a VBA module to excel that can be used to copy the content and format the table structure to paste directly into the table structure for wikimarkup in a Jira Field (So the field on text view, not visual view).  However this one also is not currently formatted for preserving the color codes, but You could modify the code to add in color coding with a .Font.Color in a HEX encoding something like the example in this next article under the section "Figuring Out The Font Color" from the spread sheet guru looks like it would do the trick.

And then pump the output in the wiki markup with color tags in this format:

|{color:#ff3333}RED Text{color}|

 if you get the appropriate HEXcolor variable using the Article from the spreadsheet guru the following Modification to the output paramaters in the VBA from the Blog would pump out the correct wikimarkup passing in the text color encoding:

If i = 1 Then
'If we are at the last cell in the column then close with pipes
'and add a line break
If j = ColumnCount Then
JIRAtable = JIRAtable & "||" & "{color:" & HEXcolor & "}" & tempText & "{color}" & "||" & Chr(10)
Else
JIRAtable = JIRAtable & "||" & "{color:" & HEXcolor & "}" & tempText & "{color}"
End If
Else
'If we are at the last cell in the column then close with pipes
'and add a line break
If j = ColumnCount Then
JIRAtable = JIRAtable & "|" & "{color:" & HEXcolor & "}" & tempText & "{color}" & "|" & Chr(10)
Else
JIRAtable = JIRAtable & "|" & "{color:" & HEXcolor & "}" & tempText & "{color}"
End If
End If

I knows it a bit extra work up front, but depending on how often you need to modify the color codes this could save you a bit of overhead in the long run until the feature request can be addressed

Regards,
Earl

Juan Du Toit
Contributor
February 12, 2019

Thanks Earl for all the effort you went to for the above comment

Like Earl McCutcheon likes this

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events