The intent is to have the results of several filters used in several tables in one email report.
While the Lookup issues are able to pull up the tickets fine, I'm stumped at how to store the full results of each lookup, and then retrieve them to use in the email.
When running the automation, I end up with the error:
Advanced branching - Can't branch rule as no conditions/actions have been configured for it. Either delete Branch or add some components for the branch.
Currently I have the automation set up like this:
https://ibb.co/JRzpqN1C
The main tree starts with a daily "schedule", followed by the first "Then: Lookup Issues". Then a branch is set containing a "For each: Smart Value" and ends there. The main branch repeats another "Then: Lookup Issues", followed by a branch with "For each: Smart Value".
The main tree ends with a Then: Send Email
In the first "For each: Smart Value", I have the following configured:
Smart value: {{lookupIssues.key}}{{lookupIssues.summary}}{{lookupIssues.created}}{{lookupIssues.status.name}}{{lookupIssues.customfield_10098}}
Variable name: currentlyopentickets
I've tried creating a branch that uses "Branch rule / related issues" Type: Current issue.
Followed by a "Then: Create Variable" as well
When saving, The "For: Current Issue" displays an error:
This component may be incompatible One of the following needs to be produced earlier in the rule by the trigger or with a 'for each' branch for this component to work: Issue
Is this the correct way to store results and how do I use branches to accommodate multiple Lookup issues?
Thank you.
Hi @Andrew
For a question like this, context is important for the community to help. Please post the following with your question:
Until we see those...
First, you initially asked about using multiple Lookup Issues action results in a rule. That is not possible. As a workaround, the results of one lookup action may be stored for later use, perhaps with the Create Lookup Table action.
Next, the error message "This component may be incompatible..." normally indicates your rule is using an action which requires an issue and none is present in the rule.
When using the Advanced Branch over smart values, that iterates over data and not issues. And so the actions cannot "see" an issue.
Kind regards,
Bill
I apologize for the lack of information. Thank you for the Create Lookup Table action. I've tried it and it seems more 'correct' This is a sample setup with 2 "Then: Lookup issues".
However, I've ended up with some different questions:
1. Are custom fields (In filters: cf[10098]) referenced in Lookup table as "{{lookupIssues.customfield_10098}}"?
2. Using alltickets.size to count the number of tickets returns the number of columns instead. Is there a different command available to count each key?
2. The output I'm getting in the email is all tickets are grouped in one row instead of having each ticket displaying on its own row. How do I spread them out?
Table:
Thank you.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
First thing, sorry I was not more clear on how to store the data. Here is the technique with a Lookup Table storing the Lookup Issues results as objects, so they can be iterated later.
The technique you show spitting up into fields will be quite difficult to manage later.
For your follow-up questions:
1. Are custom fields (In filters: cf[10098]) referenced in Lookup table as "{{lookupIssues.customfield_10098}}"?
Please see above, and the custom field ID is the same when an issue is in context: customfield_10098.
2. Using alltickets.size to count the number of tickets returns the number of columns instead. Is there a different command available to count each key?
Using the technique above, the count of issues from the first lookup would be:
{{varFirstLookupResults.get("first").size}}
Putting those ideas together, the information from the first lookup issues result could be iterated to create your table, no different from the second one. Here I am demonstrating a bulleted list, which you may modify to create your HTML table rows.
My first lookup results:
{{#varFirstLookupResults.get("first")}}
* {{key}} -- {{summary}} -- {{status.name}}
{{/}}
My second lookup results:
{{#lookupIssues}}
* {{key}} -- {{summary}} -- {{status.name}}
{{/}}
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.