Missed Team ’24? Catch up on announcements here.

×
Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Jira Automation - Sending HTML Email with Field Table

Krister Broman _Advania_
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.
March 28, 2022

Hi Experts, 

We send out a weekly status email with some of our Portfolio Items. We send this email using automation and we format the wiki rendered fields as HTML using i.e. {{Description.html}}. This generally works well. 

Now the question, sometimes we have a table included in the field of one of the issues. Just a regular formatted table in the wikirendered field. However when sending an email with this the table will be fully removed. The text before and behind of the table will display. 

Has anyone found a way to display a table correctly?

 

1 answer

1 accepted

0 votes
Answer accepted
Mark Chaimungkalanont
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
April 4, 2022

The HTML version of the field should contain the table's HTML... I did a test and it looked like:

<div class='table-wrap'> <table class='confluenceTable'><tbody> <tr> <th class='confluenceTh'><b>This is a table</b></th> <th class='confluenceTh'>&nbsp;</th> <th class='confluenceTh'>&nbsp;</th> </tr> <tr> <td class='confluenceTd'>New line</td> <td class='confluenceTd'>COlumn 2</td> <td class='confluenceTd'>&nbsp;</td> </tr> <tr> <td class='confluenceTd'>&nbsp;</td> <td class='confluenceTd'>&nbsp;</td> <td class='confluenceTd'>&nbsp;</td> </tr> </tbody></table> </div>

You should try outputting the table using the Log Action and check the HTML, you might need to add some additional CSS styles to format it nicely in an email 

Krister Broman _Advania_
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.
April 7, 2022

Did some testing as it worked to create a table from scratch as you suggest and have it exported. The issue was related to how we updated the issue. 

In this case the table came from an external source and had merged fields. This is the key point. The wiki renderer have no issues in displaying merged fields which you copy them into Jira. You cant create merged fields with the WYSIWYG interface but copy paste works without issue. 

That however is not the case when it translates the table from wiki to html for input into the email, then it does not know how to translate merged fields.  

A point here is also that if your external source is formated in a way, that when inserted into Jira, it displays as a single column. What you have in this case is a hidden issue (which was why it was so hard for us to track down). The cells are still merged and will not be able to be inserted into an email.

Our solution was to remake all the Excel and Powerpoint templates used by the project and remove all merged fields. Then it worked. 

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events