Hi all,
I've got an automated email that goes out that grabs multiple issues via a jql query and sends out an email with them all on.
It uses {{#issues}} to pass the results into a table, however I also want a header row - so (much cut down) i have:
{{#issues}}
<table>
<tbody>
<tr>
<th>Ref</th>
<th>Title</th>
</tr>
<tr>
<td>{{key}}</td>
<td>{{summary}}</td></tr>
</tbody>
</table>
{{/}}
The issue is that this produces multiple tables, one for each issue, with a header on each table. Is there any way to combine them to produce a single table with a single header row?
Hi @John Wood ,
try to change it like this:
<table>
<tbody>
<tr>
<th>Ref</th>
<th>Title</th>
</tr>
{{#issues}}
<tr>
<td>{{key}}</td>
<td>{{summary}}</td>
</tr>
{{/}}
</tbody>
</table>
Thanks @Hana Kučerová
Unfortunately what happens there is that the first issue appears in a table, the rest just appear as text - its the first thing I tried as it seems logical, but no joy
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hmmm, just tested it and it seems to be working...
Did you try to uncheck the option "Convert line breaks to HTML line breaks"?
There are a lot of line breaks, when the option is checked, maybe that's why the formatting is broken.
Which email client do you have?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Outlook - I didn't consider the email client being the source of the issue after this amendment, I'll have a look at the source of them email and see what is happening
edit: Unfortunately if it is the line break thing and that is a setting in the client, not a lot I can do about it as there are loads of recipients and I cant ask them all to change a setting for this report
edit2: Ah I see in the automation section - unfortunately this is Automation for Jira rather than the standard automation, and it doesn't seem to have that option, and I dont think there is an option for using a schedule rather than having a trigger in normal automation
edit3: I'm blind, it does have that option, testing now
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You're a legend :)
After all that it was indeed that it was converting line breaks, which I should have realised as I'd had to change the code from being nicely laid out to all a big block of code to make it not insert line breaks all over the place!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Im unable to get the table form with issue and details
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I too have tried to follow the HTML formatting, but no table or values are populating.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Depends on how {{#issues}} is replaced, is it an array of some sort or did you already construct it like a table.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Ah that sound promising - no I only create the table in the email body field, it isn't being passed through as a table or anything (didnt know this was possible)
The settings are:
Are you saying there is a way to have it passed through as a table to start with, something in the jql?
I should probably have said, this is using "Automation for Jira" Add-on, I thought it was just called "Project Automation"
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.