I am trying to set up an automation job which sends out an email to the reporter of the issue is certain fields are missing data. Here's the email template I use in the send email section of the automation.
This epic is missing the following fields
<ul>
{{#if(issue.fixVersions.isEmpty)}}
<li>No fix version is assigned to the epic. Epic is empty</li>
{{/}}
{{#if(not(exists(issue.fixVersions.name)))}}
<li>No fix version is assigned to the epic</li>
{{/}}
{{#if(not(exists(issue.components.name)))}}
<li>The epic does not have any components assigned.</li>
{{/}}
{{#if(components.isEmpty)}}
<li>The epic does not have any components assigned. Component is empty</li>
{{/}}
</ul>
the fixversions work but the components conditional statement does not get triggered.
I have logged components.name and it is indeed empty so I am not sure why the message above is not displayed in the email.
You do not show your entire automation rule, and I wonder if there is a context problem where the email is seeing another issue.
Perhaps add the missing prefix for issue. such as:
{{#if(issue.components.isEmpty)}}
<li>The epic does not have any components assigned. Component is empty</li>
{{/}}
If that does not work, you could try checking the size as the components field is a list.
Kind regards,
Bill
The issue is that the message should be displayed when there are no components (empty object) or fixversions but that is not working.
I added the prefix and that does not work either.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
So the whole block of smart values looks like this
This epic is missing the following fields
<ul>
{{#if(issue.fixVersions.name.isEmpty)}}
<li>No fix version is assigned to the epic. Epic is empty</li>
{{/}}
{{#if(not(exists(issue.fixVersions.name)))}}
<li>No fix version is assigned to the epic</li>
{{/}}
{{#if(not(exists(issue.customfield_12313140)))}}
<li>Epic is is not linked</li>
{{/}}
{{#if(not(exists(issue.Team)))}}
<li>The epic is not assigned to a team</li>
{{/}}
{{#if(not(exists(issue.components.name)))}}
<li>The epic does not have any components assigned.</li>
{{/}}
{{#if(issue.components.isEmpty)}}
<li>The epic does not have any components assigned. Component is empty</li>
{{/}}
</ul>
So from all of the above conditionals only the team and the customfield displays a message. All the other conditionals generate a null even if the fixversions or components have no value assigned.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I am using Jira Cloud, and all of those worked for me in a test rule. Perhaps this is something different about the smart values for Jira Server/Data Center.
I suggest working with your site admin to submit a ticket to Atlassian Support to see what they can find: https://support.atlassian.com/contact/#/
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.