Dear community,
I need your support.
I'd like to create following rule:
I tried the condition the following condition but It did not work.
{{lookupIssues.parent.dueDate}} is lower than {{lookupIssues.dueDate}}
Any clue how to solve that? Thanks!
I wrote this sample rule. See if this gets you going. Assumption is if any of the child issue has a due date > than parent, then it needs to be flagged.
Therefore, I used max to simplify the logic.
Hi @Vishal Biyani,
thank you, that check works. But with that rule, all lookup issues are displayed in the audit log. Do you know how to add only those issues that correspond to the condition?
Thank you!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
adding this condition
{{#lookupIssues}} {{ if( due date.isAfter(parent.due Date) ) }} {{key}} {{parent.key}} {{/}}
gives True if issues due date is after parent due Date otherwise it does not print anything.
This logic you can build in email template to send issues that match the condition
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
There was slight error in the above. use this and you will get the required issue keys.
{{#lookupIssues}} {{ if (due date.isAfter(parent.due Date), key) }} {{/}}
If this helps you, please accept the answer so that others can also benefit
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
thank you, Vishal!
If the condition matches, the output works fine. But for those issues the condition does not match, empty rows are displayed in my email output, screenshot below:
Is there something like an "else function", so if the condition does not match, do not create a row in the table?
and secondly, I'd like to have a scheduled trigger and not a manual trigger. If I just replace it, the branch reports an error like no issues found.
Do you know how to fix that? Thanks!
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.
Can you share your rule so far?
Also, share the logic that you are using when creating the table.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hey @Vishal Biyani
this is the rule that I have created so far
And the html body of the mail I'm currently using is:
<html>
<body>
<table border="1" cellpadding="5">
<tr>
<th>Ticket</th>
<th>Beschreibung</th>
<th>Komponente</th>
<th>Bearbeiter</th>
<th>Fälligkeit Epic</th>
<th>spätestes Fälligkeitsdatum untergeordnete Tickets</th>
<th>Link zum Epic</th>
</tr>
{{#lookupIssues}}
<tr>
<td>{{parent.key}}</td>
<td>{{parent.Summary}}</td>
<td>{{parent.components.name}}</td>
<td>{{parent.assignee.displayName}}</td>
<td>{{parent.dueDate}}</td>
<td>{{dueDate}}</td>
<td>{{parent.url}}</td>
</tr>
{{/}}
</table>
</body
</html>
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
It is possible that double lookups are causing this issue. The logic can be simplified as below:
project = <your project> and issuetype in standardIssueTypes() and issuetype != Epic and parent IS NOT EMPTY and component in (<your list of components)
This will return all standard issues that have a parent Epic
See if this works for you.
<html>
<body>
<table border="1" cellpadding="5">
<tr>
<th>Issue Key</th>
<th>spätestes Fälligkeitsdatum untergeordnete Tickets</th>
<th>Epic</th>
<th>Beschreibung</th>
<th>Komponente</th>
<th>Bearbeiter</th>
<th>Fälligkeit Epic</th>
<th>Link zum Epic</th>
</tr>
{{#lookupIssues}}
{{#if (due date.isAfter(parent.due Date))}}
<tr>
<td>{{key}} </td>
<td>{{dueDate}}</td>
<td>{{parent.key}}</td>
<td>{{parent.Summary}}</td>
<td>{{parent.components.name}}</td>
<td>{{parent.assignee.displayName}}</td>
<td>{{parent.dueDate}}</td>
<td>{{parent.url}}</td>
</tr>
{{/}}
{{/}}
</table>
</body
</html>
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Vishal Biyani ,
thank you for your adjustments.
But unfortunately, the rule does not work properly. The automation itself works but there are no tickets expressed in the email output even if there are a few tickets that meet the condition.
Could you please check once again? Thank you!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
To debug the issue can you share the audit log and expand each step.
Also, share the screen shot of the updated automation that you have.
The lookup issue should show issues if the JQL matches. Logs will hopefully help debug where the issue is happening
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Dear @Vishal Biyani ,
the new rule looks like this:
As I said, the rule execution itself was successful.
An email has been sent but it contains only the headers and no content:
The new html body:
<html>
<body>
<table border="1" cellpadding="5">
<tr>
<th>Epic</th>
<th>Fälligkeit Epic</th>
<th>Ticket</th>
<th>Beschreibung</th>
<th>Komponente</th>
<th>Bearbeiter</th>
<th>Fälligkeit Epic</th>
<th>Link zum Epic</th>
</tr>
{{#lookupIssues}}
{{#if(dueDate.isAfter(parent.dueDate))}}
<tr>
<td>{{key}} </td>
<td>{{dueDate}}</td>
<td>{{parent.key}}</td>
<td>{{parent.Summary}}</td>
<td>{{parent.components.name}}</td>
<td>{{parent.assignee.displayName}}</td>
<td>{{parent.dueDate}}</td>
<td>{{parent.url}}</td>
</tr>
{{/}}
{{/}}
</table>
</body
</html>
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
When you run the JQL which is being used in lookup in JIRA search window, how many rows do you get?
Also, the assumption is both Epic and its child issues have due date populated. if that is not the case, then comparison won't work and could result in a blank email.
Can you check on these two points?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
the JQL statement finds 614 issues in the lookup action. There are some child issues that do not contain a due date.
Edit: I have added the part "AND dueDate is not EMPTY" to the JQL statement and now it works and the email output is not blank anymore!
Thank you so much!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
WOW!!! Good to know that it worked for you. in the process, I also learnt few things :-).
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Atlassian Government Cloud has achieved FedRAMP Authorization at the Moderate level! Join our webinar to learn how you can accelerate mission success and move work forward faster in cloud, all while ensuring your critical data is secure.
Register NowOnline 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.