Hello,
I have a table in Automation Send Email that is set up to filter tickets with either of 2 statuses instead of the full results of a JQL search:
<h2>List 2 filter: {{lookupIssues.size}}</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(status.name.startsWith("Status1"),status.name.startsWith("Status2")))}}
<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>
How do I go about displaying the count of tickets in the table? lookupIssues.size shows the full count of tickets from the search.
Thank you.
Options:
A) Fully in the email template. Use a counter set to zero before the "lookIssues", increment that within the "if" and display it that counter.
B) In the search. Create a copy of the original CQL adding the additional criteria:
<your original search> and status IN ("Status1", "Status2")
Then just use this CQL and don't change the email template.
C) In the search without copying the original search. Take the ID of the original CQL saved filter (if it is a saved filter) and use this CQL:
filter=<ID of your original save filter> and status IN ("Status1", "Status2")
Then just use this CQL and don't change the email template.
The nicety here is that it will not duplicate the original saved filter plus will adapt itself if that is changed.
My order of preference:
C, B and only then A.
Hello @Aron Gombas _Midori_
Sorry for the late response.
If its okay to expand the scenario a bit, I now have several tables in that one email and each table is to filter the full search to show breakdowns of statuses.
For method B, would not the new lookupIssues search override the results of the original search? or is there some declaration I can start the "Then: Lookup issues" with to save the results.
For C, do I save a filter in Filters first (say "All_x_tickets_in_x"), then reference the filter by name and add on any further filters? (i.e. - filter=<All_x_tickets_in_x> and status IN ("Status1", "Status2")
Thank you.
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.