We would like to send an E-Mail to customers when Changes are approved and will be worked on. Part of that are specific tables agreed upon with the Client.
What is the best way to realize this?
currently the {{issue.description}}/{{issue.description.html}} mails and all different configurations underneath (convert line breaks to html etc.) either don't send the table or create "gibberish".
{adf:display=block}
{"type":"table","attrs":{"isNumberColumnEnabled":false,"layout":"default","localId":"093a1dbf-5720-48d3-9768-d33d9de2534c"},"content":[{"type":"tableRow","content":[{"type":"tableCell","attrs":{"rowspan":2},"content":[{"type":"paragraph","content":[{"type":"text","text":"Change-Typ"}]}]},{"type":"tableCell","attrs":{},"content":[{"type":"paragraph","content":[{"type":"text","text":"Major-Change"}]}]},{"type":"tableCell","attrs":{},"content":[{"type":"paragraph","content":[{"type":"text","text":"Minor-Change"}]}]},{"type":"tableCell","attrs":{},"content":[{"type":"paragraph","content":[{"type":"text","text":"Emergency-Change"}]}]}]},{"type":"tableRow","content":[{"type":"tableCell","attrs":{},"content":[{"type":"paragraph","content":[{"type":"text","text":"x"}]}]},{"type":"tableCell","attrs":{},"content":[{"type":"paragraph","content":[]}]},{"type":"tableCell","attrs":{},"content":[{"type":"paragraph","content":[]}]}]},{"type":"tableRow","content":[{"type":"tableCell","attrs":{},"content":[{"type":"paragraph","content":[{"type":"text","text":"Titel"}]}]},{"type":"tableCell","attrs":{"colspan":3},"content":[{"type":"paragraph","content":[{"type":"text","text":")
Hi, @Marius Fischer
I think, that you'll need to use list of replaces like:
.replace('{"type":"table"', '<table>')
.replace('{"type":"tableRow"', '<tr>')
.replace('}]}, {"type":"tableRow"', '</tr><tr>')
.replace('}]}', '</tr></table>')
.replace('{"type":"tableCell"', '<td>')
.replace('}, {"type":"tableCell"', '</td><td>')
.replace('{"attrs":{"rowspan":2}', 'rowspan="2"')
.replace('{"attrs":{"colspan":3}', 'colspan="3"')
.replace('{"content":[', '')
.replace('{"type":"paragraph","content":[', '')
.replace('{"type":"text","text":"', '')
.replace('"}]}', '</td>')
.replace('"}]}, {"type":"tableCell"', '</td><td>')
.replace('"}]}, {"type":"tableRow"', '</td></tr><tr>')
.replace('"}]}}', '</td></tr></table>')
It will generate table like...
<table>
<tr>
<td rowspan="2">Change-Typ</td>
<td>Major-Change</td>
<td>Minor-Change</td>
<td>Emergency-Change</td>
</tr>
<tr>
<td>x</td>
<td></td>
<td></td>
</tr>
<tr>
<td>Titel</td>
<td colspan="3">)
...
</td>
</tr>
</table>
Thank you @Evgenii
for the fast response!
I am not familiar with HTML, so excuse my lack of knowledge. How would i insert sucha replace list? currently my Automation looks like this:
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
{{issue.description.html.replace('{"type":"table"', '<table>').replace('{"type":"tableRow"', '<tr>').replace('}]}, {"type":"tableRow"', '</tr><tr>').replace('}]}', '</tr></table>').replace('{"type":"tableCell"', '<td>').replace('}, {"type":"tableCell"', '</td><td>').replace('{"attrs":{"rowspan":2}', 'rowspan="2"').replace('{"attrs":{"colspan":3}', 'colspan="3"').replace('{"content":[', '').replace('{"type":"paragraph","content":[', '').replace('{"type":"text","text":"', '').replace('"}]}', '</td>').replace('"}]}, {"type":"tableCell"', '</td><td>').replace('"}]}, {"type":"tableRow"', '</td></tr><tr>').replace('"}]}}', '</td></tr></table>')}}
Something like this, I think. But this solution looks very weird, I'm sure there is way to make it easier.
For more exact answer, can you give me original text from description? Or screenshot?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
This is the table that we would like to send via Mail
the {{issue.description}} Automation configured as *send as html* as well as *send as plain text* is received in Outlook as:
Change 1: {adf:display=block} {"type":"table","attrs":{"isNumberColumnEnabled":false,"layout":"default","localId":"093a1dbf-5720-48d3-9768-d33d9de2534c"},"content":[{"type":"tableRow","content":[{"type":"tableCell","attrs":{"rowspan":2},"content":[{"type":"paragraph","content":[{"type":"text","text":"Change-Type"}]}]},{"type":"tableCell","attrs":{},"content":[{"type":"paragraph","content":[{"type":"text","text":"Major-Change"}]}]},{"type":"tableCell","attrs":{},"content":[{"type":"paragraph","content":[{"type":"text","text":"Minor-Change"}]}]},{"type":"tableCell","attrs":{},"content":[{"type":"paragraph","content":[{"type":"text","text":"Emergency-Change"}]}]}]},{"type":"tableRow","content":[{"type":"tableCell","attrs":{},"content":[{"type":"paragraph","content":[]}]},{"type":"tableCell","attrs":{},"content":[{"type":"paragraph","content":[{"type":"text","text":"x"}]}]},{"type":"tableCell","attrs":{},"content":[{"type":"paragraph","content":[]}]}]},{"type":"tableRow","content":[{"type":"tableCell","attrs":{},"content":[{"type":"paragraph","content":[{"type":"text","text":"Title"}]}]},{"type":"tableCell","attrs":{"colspan":3},"content":[{"type":"paragraph","content":[{"type":"text","text":"Test 2"}]}]}]},{"type":"tableRow","content":[{"type":"tableCell","attrs":{},"content":[{"type":"paragraph","content":[{"type":"text","text":"Demand-Nr. / Incident-Nr."}]}]},{"type":"tableCell","attrs":{"colspan":3},"content":[{"type":"paragraph","content":[{"type":"text","text":"1234"}]}]}]},{"type":"tableRow","content":[{"type":"tableCell","attrs":{},"content":[{"type":"paragraph","content":[{"type":"text","text":"content of change"}]}]},{"type":"tableCell","attrs":{"colspan":3},"content":[{"type":"paragraph","content":[{"type":"text","text":"TestTest"}]}]}]},{"type":"tableRow","content":[{"type":"tableCell","attrs":{},"content":[{"type":"paragraph","content":[{"type":"text","text":"Initiator"}]}]},{"type":"tableCell","attrs":{"colspan":3},"content":[{"type":"paragraph","content":[{"type":"text","text":" Marius"}]}]}]}]} {adf}
and the {{issue.description.html}} *as plain text* :
<p>Change 1:</p>
<!-- ADF macro (type = 'table') -->
<p> </p>
and the {{issue.description.html}} *as html*:
Change 1:
[nothing else]
is this helpful?
Greetings, Marius
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Yes, information is enough. I'll check how it can be formatted. As I see, it's not standard, it contains adf tags. I suppose, it's from some sort of forms plugin
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Sorry, no luck. I tried to change it, but I see, that required information is inside content block, and it's generated not in standard way. Maybe you'll try to disable using forms and make tables by jira standard means?
I made test task with standard table, and saved descriptions in different ways.
{{issue.description.html}} and {{issue.description}} and it works fine
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thank you, this solved the issue for me, with the Jira basic table i can generate one in Outlook!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.