Issue in table generation through Lookup Issues Automation
Asked by Yash Sheetal Bhandarkar:

Hi Team,

I have created an automation for Lookup Issues in Jira Data Center with an JQL \& an email will sent to the Assignee, Reporter \& Watchers of the ticket present in the Jira Tickets of the JQL within a table. The Jira Tickets data will be sent to them in a Table.

The thing is that everything is working fine but the table which is getting generated is having many extra boxes \& spaces in it. I have run the same code by creating same rule in Jira Cloud but over their everything looks fine \& clean \& table generated is also clean.![Screenshot 2024-06-24 091403.png](/t5/image/serverpage/image-id/331312i576D489D02C6534A/image-size/large?v=v2&px=999 "Screenshot 2024-06-24 091403.png")

![Screenshot 2024-06-24 091417.png](/t5/image/serverpage/image-id/331313i8C6D14346DFACC98/image-size/large?v=v2&px=999 "Screenshot 2024-06-24 091417.png")![Screenshot 2024-06-24 091441.png](/t5/image/serverpage/image-id/331314i2683C7D76CEBE9E5/image-size/large?v=v2&px=999 "Screenshot 2024-06-24 091441.png")

I am attaching screenshot of the Table which is getting generated in email in Jira Data Center. Also attaching the Screenshots of the Automation \& Code written withing the Automation to generate table.

![Screenshot 2024-06-24 092111.png](/t5/image/serverpage/image-id/331315iC947ED729527C02B/image-size/large?v=v2&px=999 "Screenshot 2024-06-24 092111.png")

Please help me over this.

Thanks \& Regards,

Yash![Screenshot 2024-06-24 091233.png](/t5/image/serverpage/image-id/331311i9FD6092DF7B55AE8/image-size/large?v=v2&px=999 "Screenshot 2024-06-24 091233.png")


Answers:
author: Bill Sheboy
body: Hi [@Yash Sheetal Bhandarkar](/t5/user/viewprofilepage/user-id/4965733)

First thing, what problem are you trying to solve by running this rule *every 5 minutes*? That seems like it would be overwhelming to the recipients.

Next, as your rule is written it will send the email multiple times. This is because the trigger has JQL without the option selected to "simply run the conditions and actions without providing the issues." The fix for that is to either enable that option, or remove the JQL from the trigger (and add a condition after the Lookup Issues action to check for results).

What is the purpose of the conditional logic in your HTML, as every one of those fields except the Assignee will definitely have a value? Perhaps there is a problem with the conditional HTML getting confused with the smart value syntax for conditional logic: <https://confluence.atlassian.com/automation/jira-smart-values-conditional-logic-1081351607.html>

The fix for that may be to remove the conditions for Issue Type, Key, and Summary, and replace the one for Assignee with this:

```
<td style="border: 1px solid #ddd; padding: 8px;">{{assignee.displayName}}{{#if(not(exists(assignee.displayName)))}}Unassigned{{/}}</td>
```

That will always include the Assignee's displayName, if it exists, and when it does not, use Unassigned.

Kind regards,  
Bill

comments: author: Yash Sheetal Bhandarkar
body: Hi Bill,

Please find my reply for every question you asked -
> First thing, what problem are you trying to solve by running this rule *every 5 minutes* ? That seems like it would be overwhelming to the recipients.

When running the Automation Rule for Lookup Issues, the table in which we want the data to be sent to the users using Email, its showing empty boxes in the Table as shared in the above discussion description.
> Next, as your rule is written it will send the email multiple times. This is because the trigger has JQL without the option selected to "simply run the conditions and actions without providing the issues." The fix for that is to either enable that option, or remove the JQL from the trigger (and add a condition after the Lookup Issues action to check for results).

Okay, I will remove that JQM from Trigger.
> The fix for that may be to remove the conditions for Issue Type, Key, and Summary, and replace the one for Assignee with this:

Can you please elaborate this in detail so that I can make changes accordingly in the Automation ?

Thanks \& Regards,

Yash


Tags: data-center

jira-data-center