Hi,
I'm using Jira Software (v9.4.8) Data center in my company. I'm administrator of my project, but not administrator of the full instance.
I'm trying to use an automation rule to, by click, send a mail with a table containing all the issues with priority = highest. I have 7 columns in my table ; 1 column displays 1 attribute.
I'm succeeding to display 4 of my 7 columns. The 3 last columns are empty, even if the information is well described in my ticket. When I try to call the attribute value of my current ticket outside of my lookup issue loop, it's working. When I call it inside my lookup issue loop, it's not working.
Status of my audit log is "success".
Here is the code of my "Send mail" action:
<table style="border-collapse: collapse" table-layout="fixed" width="100%">
<tr>
<th style="border: 1px solid #000000; background-color : #CDCACA" valign="middle" halign="center">Clé</th>
<th style="border: 1px solid #000000; background-color: #CDCACA" valign="middle" halign="center">Résumé</th>
<th style="border: 1px solid #000000; background-color: #CDCACA" valign="middle" halign="center">Statut</th>
<th style="border: 1px solid #000000; background-color: #CDCACA" valign="middle" halign="center">Responsable</th>
<th style="border: 1px solid #000000; background-color: #CDCACA" valign="middle" halign="center">PIC</th>
<th style="border: 1px solid #000000; background-color: #CDCACA" valign="middle" halign="center">Priority</th>
<th style="border: 1px solid #000000; background-color: #CDCACA" valign="middle" halign="center">Last comment</th>
</tr>
{{#lookupIssues}}
<tr><td style="border: 1px solid #000000" valign="middle" align="center"><a href="{{toUrl}}">{{key}}</a></td>
<td style="border: 1px solid #000000" valign="middle">{{summary}}</td>
<td style="border: 1px solid #000000" valign="middle">{{status.name}}</td>
<td style="border: 1px solid #000000" valign="middle" align="center">{{assignee.displayName}}</td>
<td style="border: 1px solid #000000" valign="middle" align="center">{{customfield_11600}}</td>
<td style="border: 1px solid #000000" valign="middle" align="center">{{customfield_11601}}</td>
<td style="border: 1px solid #000000" valign="middle" align="center">{{comments.getFromEnd(0).body}}</td>
</tr>
{{/}}
</table>
Here is the result by mail:
Could it be a problem from administration right?
How could I display my values?
Thank you,
Hi @Garn -- Welcome to the Atlassian Community!
For Jira Server / Data Center, the lookup issues action only supports some fields at this time. Here is the suggestion to add more, which you may vote for / watch to see progress: https://jira.atlassian.com/browse/JIRAAUTOSERVER-877
When the lookup issues action was added for Jira Cloud, it also supported a limited number of fields. About a year later, all of the remaining ones were added. Perhaps that will also happen for the other versions.
Until then...a couple of work-arounds are:
Kind regards,
Bill
Hi Bill,
Thank you a lot for your help.
I tried your first work-around, and now it's displaying all the information as required in the table. The problem now is that I have a table with 1 row, and all information of my tickets are stored in the same column cell, separated with comma.
Any idea how to display it with one ticket = one row ?
Here is my new automation rule
<table style="border-collapse: collapse" table-layout="fixed" width="100%">
<tr>
<th style="border: 1px solid #000000; background-color : #CDCACA" valign="middle" halign="center">Clé</th>
<th style="border: 1px solid #000000; background-color: #CDCACA" valign="middle" halign="center">Résumé</th>
<th style="border: 1px solid #000000; background-color: #CDCACA" valign="middle" halign="center">Statut</th>
<th style="border: 1px solid #000000; background-color: #CDCACA" valign="middle" halign="center">Responsable</th>
<th style="border: 1px solid #000000; background-color: #CDCACA" valign="middle" halign="center">PIC</th>
<th style="border: 1px solid #000000; background-color: #CDCACA" valign="middle" halign="center">Priority</th>
<th style="border: 1px solid #000000; background-color: #CDCACA" valign="middle" halign="center">Last comment</th>
</tr>
<tr><td style="border: 1px solid #000000" valign="top" align="center"><a href="{{toUrl}}">{{issues.key}}</a></td>
<td style="border: 1px solid #000000" valign="top">{{issues.summary}}</td>
<td style="border: 1px solid #000000" valign="top">{{issues.status.name}}</td>
<td style="border: 1px solid #000000" valign="top" align="center">{{issues.assignee.displayName}}</td>
<td style="border: 1px solid #000000" valign="top" align="center">{{issues.customfield_11600}}</td>
<td style="border: 1px solid #000000" valign="top" align="center">{{issues.customfield_11601}}</td>
<td style="border: 1px solid #000000" valign="top" align="center">{{issues.comments.last}}</td>
</tr>
</table>
Thank you!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
In your original rule, you iterated over the lookup with this:
{{#lookupIssues}}
using the data for the table, such as {{key}} and {{summary}}
{{/}}
Now using bulk-handling for issues, it would be this:
{{#issues}}
using the data for the table, such as {{key}} and {{summary}}
{{/}}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Bill,
Thank you for your time! Unfortunately, I still need some help. With {{#issues}} instead of my {{#lookupIssues}}, it's still not displaying the data into a table. The first ticket is into the table, then everything is outside.
Here is my code
<table style="border-collapse: collapse" table-layout="fixed" width="100%">
<tr>
<th style="border: 1px solid #000000; background-color : #CDCACA" valign="middle" halign="center">Clé</th>
<th style="border: 1px solid #000000; background-color: #CDCACA" valign="middle" halign="center">Résumé</th>
<th style="border: 1px solid #000000; background-color: #CDCACA" valign="middle" halign="center">Statut</th>
<th style="border: 1px solid #000000; background-color: #CDCACA" valign="middle" halign="center">Responsable</th>
<th style="border: 1px solid #000000; background-color: #CDCACA" valign="middle" halign="center">PIC</th>
<th style="border: 1px solid #000000; background-color: #CDCACA" valign="middle" halign="center">Priorité</th>
<th style="border: 1px solid #000000; background-color: #CDCACA" valign="middle" halign="center">Dernier commentaire</th>
</tr>
{{#issues}}
<tr><td style="border: 1px solid #000000" valign="top" align="center"><a href="{{toUrl}}">{{key}}</a></td>
<td style="border: 1px solid #000000" valign="top">{{summary}}</td>
<td style="border: 1px solid #000000" valign="top">{{status.name}}</td>
<td style="border: 1px solid #000000" valign="top" align="center">{{assignee.displayName}}</td>
<td style="border: 1px solid #000000" valign="top" align="center">{{customfield_11600}}</td>
<td style="border: 1px solid #000000" valign="top" align="center">{{customfield_11601}}</td>
<td style="border: 1px solid #000000" valign="top" align="center">{{comments.last}}</td>
</tr>
</table>
{{/}}
Plus, I also figure out that if I call the rule in a highest priority ticket, it's displaying all the highest priority ticket except the one from which I called the automation rule. Not my priority, but to keep in mind.
Do you have a solution for the display of data in my table with 1 ticket = 1 row ?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Notice that the closing {{/}} is outside the scope of the table row </tr> and thus impacts the table. Try moving {{/}} to immediately after </tr> and re-test.
Regarding the missing issues, I wonder if there is a built-in constraint on the JQL branch to exclude the trigger issue (by automatically adding to the JQL). I know that is the case for some branches, but I am not using Jira Server / Data Center version and so cannot test that. Perhaps try making your JQL more explicit and see what happens:
( priority = Highest OR key = {{triggerIssue.key}} )
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.