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

Printing Description Table in Automated Email

Matheus Takeshi Yano Tako November 10, 2023

Hello Everyone,

 

I'm new to Jira.

I've created a Jira Automation to send a email to a sprecific group as I change the status of the issue from Pending to In Progress. The email worked but in these issues I got a table as the following image.Description Table.png

I would like this table to be printed in the email the same way I see in the description issue. But all I get is this:

Email Example.png

This is what I've tried to do to print the table in the email:

<table>
<tbody>
<tr>
<th>Description</th>
</tr>
{{#issues}}
<tr>
<td>{{description}}</td>
</tr>
{{/}}
</tbody>
</table>

Can anyone help me please need this ASAP.

Thanks in Advance.

1 answer

1 accepted

0 votes
Answer accepted
Murat Seven
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.
November 10, 2023

Hi @Matheus Takeshi Yano Tako and Welcome to the Atlassian Community!

 

Can you adding .html after description in smart value. {{issue.description.html}}

 

In your case it will look like:

<table>
<tbody>
<tr>
<th>Description</th>
</tr>
{{#issues}}
<tr>
<td>{{description.html}}</td>
</tr>
{{/}}
</tbody>
</table>

Hope this helps. If the issue is resolved, you can vote and accepted for this comment.

 

Best,

Murat Seven

Matheus Takeshi Yano Tako November 10, 2023

Hi Murat, how are you doing?

 

This has helped me. Look at the test I've just tried minutes ago:

Email Example V2.png

It worked but I would like to format it to look more like a table. Is it possible to add a margin to every column and line?

 

By the way thanks for responding in such short notice.

Best Regars,

 

Matheus.

Murat Seven
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.
November 10, 2023

thank you and how are you doing?

You're welcome. I'm glad I could help.

 

Normally, style expressions like "margin" can be used in smart values. However, I think we cannot use this within a table. You can try conveying this with a few examples and testing.

 

This code will not provide what you're looking for, but you can examine it for the sake of an example;

<table>
<tbody>
<tr>
<th>Description</th>
</tr>
{{#issues}}
<tr>
<td style="margin: 70px; border: 1px solid #4CAF50">{{description.html}}</td>
</tr>
{{/}}
</tbody>
</table>
Matheus Takeshi Yano Tako November 10, 2023

Murat,

 

I am great, thanks.

 

If the values of each column were in custom fields would I be able to create a table with margins or it would look the same (table without margins)?

 

I'll test it and see if I can manage a way around to create a table with margins. But you already helped with the main issue.

Thank you for all the help.

 

Best Regards,

 

Matheus.

Murat Seven
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.
November 10, 2023

Matheus,

 

If the values of each column were in separate fields, you could accomplish this. However, since this table comes from a single system field (description), I'm not sure.

 

I hope you find a way and share it here. I would really appreciate receiving positive news from you :) 

 

Best Regards,

Murat Seven

Matheus Takeshi Yano Tako November 13, 2023

Hi Murat,

Sorry for the delay.

I had to search a lot to get the results I wanted from the start.

So basically, as we talked last week I had to delete the description Table and create a lot of customs fields to be able to send a table with grid and margins in the automated e-mail.

So I've improved a bit of our first code. This is what it looks like now:

<table>
<tbody>
<table border = "1">
<tr>
<th>Nome Requisitante</th>
<th>Data Envio Recebimento</th>
<th>Nome Fornecedor</th>
<th>Serviço/Material</th>
<th>Centro de Despesa</th>
<th>Centro de Cliente</th>
<th>Empresa</th>
<th>Joker</th>
<th>PO</th>
<th>Vencimento</th>
<th>Valor</th>
<th>Nº da Nota Fiscal</th>
<th>Forma de Pagamento</th>
<th>Código de Barras Legível</th>
</tr>
{{#issues}}
<tr>
<td>{{Nome Requisitante}}</td>
<td>{{Data Envio Recebimento}}</td>
<td>{{Nome Fornecedor}}</td>
<td>{{Serviço/Material}}</td>
<td>{{Centro de Despesa}}</td>
<td>{{Centro de Cliente}}</td>
<td>{{Empresa}}</td>
<td>{{Joker}}</td>
<td>{{PO}}</td>
<td>{{Vencimento}}</td>
<td>{{Valor}}</td>
<td>{{Nº da Nota Fiscal}}</td>
<td>{{Forma de Pagamento}}</td>
<td>{{Código de Barras Legível}}</td>
</tr>
{{/}}
</tbody>
</table>

 

But my results were a bit flawed. I got most of the information in the table. But some of them just doesn't appear. And I don't know why. Can you help me with that?
This is what it looks like in the e-mail:
Email Example V3.png

There are some columns which are filled in the issue but are not filled in the e-mail.

 

Hope you could help me with this problem.

 

Best Regards,

 

Matheus.

Murat Seven
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.
November 13, 2023

Hi @Matheus Takeshi Yano Tako  

I hope you are having a great day!

 

I have the following idea for this issue:

There might be a custom field with the same name, or there could be a syntax error. To prevent this, can you try using the customfield_id, such as customfield_10010?

 

Best,

Murat Seven

Matheus Takeshi Yano Tako November 14, 2023

Hi @Murat Seven 

I am great, thanks. Hope you're having a great day too!

 

Your suggestion worked. Using custom fields worked fine.

I think we finally solved 100% this problem.

Thanks for all the help!

It helped me a lot due to our time to implement this new automation.

 

Best Regards,

Matheus!

Suggest an answer

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

Atlassian Community Events