Hi,
New to this and I'm trying to filter out the results of a lookupIssues in Automation, to only show tickets that contain certain status.
So far, I've found that trying to stack 3 or more sets of "status.name.startsWith("Status1")," into an if statement makes it stop working completely (2 works fine), and so does "status.name.startsWith("Status1","Status2"),"
Are there alternatives to this? Perhaps some sort of nested If..not(1)..or(2)..or(3) to exclude the categories with only 2-3 statuses of interest?
Thank you.
EDIT: So I've stumbled across saving lookupIssues results into a Create Variable, to store several different queries in the same Automation. If it allows storing a table of data a link to any guide out there regarding saving the data is appreciated.
This is what worked for me. Its not neat, but this creates a table in Send Email, based off lookupIssues results, using 4 filters as an example:
<h2>Example multi filter table:</h2>
<table cellspacing="1" cellpadding="5" border="0" bgcolor="#000000"><tr bgcolor="#ffffff"><td>Type</td><td>Key⠀⠀⠀</td><td>Summary</td><td>Status</td><td>Updated</td><td>Next Steps</td></tr>
{{#lookupIssues}}{{#if(or(or(status.name.startsWith("Status1"),status.name.startsWith("Status2")),or(status.name.startsWith("Status3"),status.name.startsWith("Status4"))))}}
<tr bgcolor="#ffffff"><td>{{issueType.name}}</td><td>{{key}}</td><td>{{summary}}</td><td>{{status.name}}</td><td>{{updated.jqlDateTime}}</td><td>{{next steps}}</td></tr>{{/}}{{/}}</table>
Hi @Andrew ,
You can use || or operator in one if condition, something like this:
if (status.name.startsWith("Status1") || status.name.startsWith("Status2") || status.name.startsWith("Status3")) {
}
Thanks!!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Deepak Jain
Apologies for the mess, I'm trying out the below code and getting a "Error rendering smart-values when executing this rule" error:
<table cellspacing="1" cellpadding="5" border="0" bgcolor="#000000"><tr bgcolor="#ffffff"><td>Type</td><td>Key⠀⠀⠀</td><td>Summary</td><td>Status</td><td>Updated</td><td>Next Steps</td></tr>
{{#lookupIssues}}{{#if(status.name.startsWith("Status1")||status.name.startsWith("Status2")||status.name.startsWith("Status3"))}}
<tr bgcolor="#ffffff"><td>{{issueType.name}}</td><td>{{key}}</td><td>{{summary}}</td><td>{{status.name}}</td><td>{{updated.jqlDateTime}}</td><td>{{next steps}}</td></tr>{{/}}{{/}}</table>
Do I place the entire table between the { }, or is there something I missed?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online 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.