HI.
I was following this guide:
https://docs.automationforjira.com/issues/bulk-processing.html#smart-value-changes
The scheduled trigger is using a JQL to retrieve results.
In my example, there were 6 issues.
I received 6 individual emails instead of 1.
Each email had 1 unique issue in it.
I was expecting 1 email with 6 unique issues.
This is the email content I wrote:
The following issues require QA to R&D:
{{#issues}}
<a href="{{toURL}}">{{key}}</a> by {{assignee.displayName}}
{{/}}
What am I doing wrong?
Hi @Gil
Maybe better use subscription filter https://confluence.atlassian.com/jira064/receiving-search-results-via-email-720416706.html?_ga=2.265119887.1200879533.1569824481-1550874464.1561971593 ?
B.R.
This doesn't work
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Gil @Sameer Bansal But this does:
I have an automation whose trigger is: Run every day at 9am
Step1: The first step in the automation is to use the new lookup issues action by adding a "component: new Action" and select "Lookup Issues". Inside the lookup issues construct, add the JQL query you need (e.g., Issuetype=Bug, Status = Open ...)
Step2: Send a simple email with the following in the body of the email:
List of issues:
{{#lookupIssues}}
<a>{{key}}</a>
{{/}}
The email provide a simple list:
TD-3099
TD-3064
TD-2970
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.
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.
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.
Thanks @Bill Glynn - you are a lifesaver! Had the same issue and I did:
1. When: Scheduled
2. Action Lookup Issues with the JQL of "Est. Due Date" <= 14d
Note: Est. Due Date is a custom field we made for our project tickets.
3. Send email
works like a charm.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Bill Glynn ,
Thanks for this recommendation.
What is the syntax to include all columns in the view? e.g., Summary, Assignee, etc..
I mean, in a nice formatted columns.
Or is it possible now to have an attachment to an email automation?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thank you for this! I created a 'scheduled' version of this rule that runs once a day, but sometimes I have 0 issues and the email notification still gets sent.
How can I edit this rule so that it sends ONLY when there is at least 1 issue, and NOT send when there are 0 issues?
TYIA.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Joseph Green - Welcome to that Atlassian Community!
Can you share the JQL you use in the Scheduled Trigger? It should not finish executing the trigger if your JQL returns no results.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks @John Funk ! My rule runs as so -
1. When: Scheduled - everyday at 8:30am (no JQL here)
2. Action Lookup Issues with the JQL of "project = WinterProject AND assignee = Empty AND status not in (Blocked, Closed)"
3. Send email:
{{#lookupIssues}}
* Issue Key: <b>{{key}}</b> (<a>{{url}}</a>)
* Summary: <a>{{Summary}}</a>
{{/}}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Do you have the JQL embedded in the initial trigger itself?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I do not have the JQL embedded in the initial trigger, I just have the schedule trigger run and then in the next action 'LookUp Issues' is where I run the actual JQL.
It currently is setup as -
1) When: Scheduled - everyday at 8:30am
2) Then: Lookup Issues - search for issues using JQL "project = WinterProject AND assignee is Empty AND status not in (Blocked, Closed)"
3) And: Send Email -
Hi -
Please see the list of issues still unassigned as of 5:30pm CET / 11:30am EST today.
<b><u>List of issues:</u></b>
{{#lookupIssues}}
* Issue Key: <b>{{key}}</b> (<a>{{url}}</a>)
* Summary: <a>{{Summary}}</a>
{{/}}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You can add a Condition after the "Lookup" Action
This worked for me:
^ The audit log will still show the rule as succeeding, as it does activate the first Action. But it won't activate the second one (i.e "Send email") if it doesn't meet the Condition.
Ste
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello @Bill Glynn
Apologies for replying on a closed thread , but I have a similar use-case and lookup issue is not available as an action to me since I'm using JIRA server . Is there someway I can achieve the same thing ?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hey @Joseph Green
Do you know if there is a way to make the URL clickable? The URLs in the email I received are text rather than clickable links.
For anyone looking for the same thing, I resolved it with this thread :)
Hi -
Please see the list of issues in progress.
<ul>
{{#lookupIssues}}
<li><a href="{{url}}">{{key}} - {{Summary}}</a></li>{{/}}
</ul>
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Gil ,
I'm a support analyst of Automation for JIRA Support Team.
Firstyl, it is important to have in mind that the bulk handling of issues or bulk sending e-mails is not available for JIRA Cloud (we have this issue for tracking the development of this feature for Cloud: https://codebarrel.atlassian.net/browse/AUT-888).
So if you are using a JIRA Cloud, you cannot perform that action. And if you are using a JIRA server, you'll need to check the "Process all issues produced by this trigger in bulk" option under your "Scheduled" trigger under "More options", as shown in the image below:
Hope that information helps you.
But please let me know if you got any further questions.
Cheers,
Victor
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
ok, that explains it.
we use cloud and don't have that option.
Thanks for the info!
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.
@Victor Seger Our team would also love to have the "Process all issues produced by this trigger in bulk" option available in JIRA Cloud as well.
Do you have an ETA for that?
Thanks!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hey all,
The feature request for bulk processing of issues in Cloud was transitioned from "Backlog" to "In Progress" on April 22. We're hoping to have this available soon, as noted in this recent article 79 Questions and Answers about Jira Automation .
If you want to keep a closer eye on the progress of this feature, you can see its current status on this issue: AUT-888
Cheers,
Daniel
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Awesome - thanks, @Daniel Eads !! Is there any way to be a Watcher on that to get updates automatically?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
The Codebarrel Jira from before the merger into Atlassian (AUT tickets) doesn't have watching enabled. Any new bugs or feature requests around Automation are being filed in jira.atlassian.com now. The team is moving pretty quickly through the AUT tickets, so there will be less of these over time and the ones that you see most frequently around Community now are likely the ones to be closed out first.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @John Funk , @Albert Alemany , @qais_alkhateeb
I just noticed AUT-888 was moved to "Done" today - just for your information :)
Ste
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
The feature is now in production, you can search for "lookup" in available actions! More documentation following soon!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks for the update. In the meantime I'm using JQL subscriptions.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
No worries! Here's an example for you if you wanna try it right away:
1. Setup scheduled trigger
2. Select "Lookup issues" as the action and put in your JQL
3. Setup email action which can now access the data from the looked up issues (example is from when using "release version" trigger)...
Subject: So much goodness, we just released awesome app v{{version}} Content: <ul> {{#lookupIssues}} <li>{{key}} - {{summary}}</li> {{/}} </ul>
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks. That's quite helpful!
Is there a way to use that to pass a list of issues in a Slack message?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Right now it only puts the issue.key in the body if I use {{lookupIssues}}.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Gil Yes, you can achieve this by adopting like the example above for your purpose.
@Tom De Blende Did you see the example above? The # is important when using the smart value provided by the lookup issue action step.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks @sreuter
Last thing, for JSD and SLA, is it possible to access the Time to Resolution in the list and present how many hours/minutes left to breach SLA?
Example:
{{#lookupIssues}}
• {{key}} - {{summary}} - in {{"Time to resolution"}}
{{/}}
In my case the TTR is:
customfield_12230": {"id": "1","name": "Time to resolution",
I'm not able to make it work.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I used the customfield variable as a smart value but that didn't work. It didn't list how many hours to breach SLA.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Victor Seger @sreuter This works great. However: how can I abort an automation if lookupIssues is empty before sending out a message? I wasn't able to create a working size check on this.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
JRACLOUD-75698 raised by support to add the bulk feature back on a scheduled automation folks, if you would like to watch/vote.
While LookupIssues is useful, if it finds no issues it will cause the automation to error, which can be undesirable and noisy.
By contrast, using the JQL constraint on a scheduled task will pass the automation, with "no actions performed".
Like Sven, we would like to be able to assess the return without the automation failing. Thanks!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello @Victor Seger
The bulk option you suggested above only helps to send one consolidated email but does not lists out all the matched issues in the email Body. How can I achieve that ?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@sreuter I think there's a bug with the list function.
I use it in a rule to publish a list of issues, based on some trigger, in an email and slack channel.
The list is being published multiple times, say 20 times in slack and 20 emails, all are the same.
Would love to know if I can get on call with you with remote to share with you the problem as it's too complicated to explain over a text.
Thanks,
Gil
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Did you ever figure this out? I know this is super old, but what I found is that in the Trigger section of the Scheduled option, there was a checkbox for "Run a JQL search and execute actions for each issue in the query.". If I had this checked, then I got multiple emails. So I unchecked it and captured my result set using an Action called "Lookup Issues". Then I added another action to send the email.
Doing this gave me a single email with a list of issues that I was expecting.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi
In my jira i dont have the lookup action.
How can I overcome this?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I want to use the issue components field in the automation email. Neither {{components}} nor {{components.name}} seems to work.
Could you help?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Jeen Jeong - Welcome to the Atlassian Community!
Please create a new question so that more people can see it and respond AND can provide better answers to your particular need.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
I'm having some issues with automation like this and can't seem to figure out what I'm missing.
The email I'm getting looks great, but the problem is that I get 1 email per issue, but I would just like to have 1 email with the list of issues.
Can anyone see where I went wrong?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
This worked for me:
<ul>
{{#lookupIssues}}
<li><a href="{{url}}">{{key}} - {{Summary}}</a></li>{{/}}
</ul>
^ Only difference I can see is a space in your smart value between <li> and <a href...
Ste
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.
So I have a question. My customers are receiving the email with a list of issues, however, if those issues are tied to different approvers, it just sends a list and they have to figure out which issue is tied to which approver. Is there a way to specify which issue goes to which manager?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Camilo,
You should open a new question on Community so more people will see it.
First thought though is that you could add a Condition for each approver.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
We did something similar just like John said with separate conditions for each person that received the email so they only saw the items they needed to see. It's part of the JQL in the Lookup Issues automation component. Once you have it setup like you want, you can easily copy the rule, and then adjust things like the JQL and possibly the email copy, if needed.
Additionally, you can add a column for the approvers to be listed. Then everyone can easily see if the issues are for them or not. That also opens up the option to sort by that column, but if there are multiple approvers, then that might not work as expected.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I am unable to email the list of issues after branching them (and I have selected the 'Process all issues produced by this trigger in bulk' option in branch as well). Still getting individual email for each issue rather than a bulk email for all the issues as per the branch rule.
Have used the below smart value in the email body.
{{#issues}}
<a href=/{{key}}">{{key}} - {{summary}} | {{status.name}} </a>
{{/}}
Can anybody help me in this case?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi everyone,
I'm running into an issue using this feature as well.
I have tried every variation of the {{lookupIssues}} templates shared on this thread, yet the body of the email always comes up empty.
Any assistance getting this bulk email rule to work would be greatly appreciated!
Thanks!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Allison ,
Looks like you're close - you just need to add the actual lookup action as a component in your actions before trying to send the email.
I've taken the screenshot below from the "Post weekly MS Teams message with all newly created issues in Jira" rule in the Automation playground that you can use as a reference for what we're talking about here.
In your current rule, you've got a JQL search in your "When" trigger. This runs the rule each time for all the issues that turn up in the search. If the search matches 20 issues, it will try to run the actions 20 times.
What you want to do is add a Lookup Issues action between your "When: Scheduled" and "Then: Send email" components. This Lookup Issues rule will actually populate the {{lookupIssues}} array that is used in the email:
This also means that you can remove the JQL search from the "When" component, as you'll actually be fetching the issues as part of the Lookup Issues component.
Let me know if you're able to get that modified and working, or still need some assistance!
Cheers,
Daniel | Atlassian Support
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Disregard - I see you've also opened a separate question where you mention you're on Server and the Lookup Issues action is only for Cloud. Looks like Bill was able to help you out on that question. Cheers!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Anyone who's following this thread, there's a bug with the Lookup action.
It re-iterates on itself and will publish the same notification multiple times.
Say you have a list that contains 3 items, using the Lookup action, if you post a slack message or an email, it will send 3 notifications containing the 3 items.
A 2nd bug is that the Lookup will cause notifications to be published even if the list is empty.
I found a really dodgy workaround for my use case.
I wanted to notify my team via slack when Jira issues are stuck In Review for more than 24 hours. Post a slack message with the list of the Jira issues and Flag those issues. If no Jira issues are found, don't post anything.
Using the Branch function and IF conditions are helping.
Notice how I have to repeat the JQL for this to work.
Instead of using the JQL with the cron. If you use the JQL with the cron, you'll get that issue I mentioned.
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.
Hi @John Funk
It's a custom field I created in Jira.
I then use another automation rule to populate it with {{now}} each time a jira issue is transitioned to some status.
This allows me to count the time a given issue is in a given status.
I use this field quite extensively in many other automation rules and I don't understand why it's not baked in Jira.
The Updated field is not good for my usage because any change which is not a transition, re-stamps the time value in that field.
Hope it helps.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@[deleted] Neither of these are bugs with lookup issues. They're problems with your rule. If you were using the JQL with your CRON as described that would explain why you were getting multiple notifications because it then runs for each issue returned. There's no need to run the CRON with JQL, just run without and immediately do lookupIssues.
As for it sending a notification even when lookupIssues is empty, that's down to the fact that you are blindly throwing it into your Slack notification. If you don't want it to do that you need to add a condition before sending your Slack message. In one of my rules I send a different message when there are no issues or you could just choose to do nothing. If you just add an advanced compare condition looking for {{lookupIssues.size}} is greater than 0 before your Slack notification, that will do the trick.
As you clearly want to do two different things here (slack notification of a list and flagging each issue) I'd suggest that you either split it into two automation rules or you could just move the lookupIssues portion to the top (with no JQL in the CRON). So long as it's before your branch rule it should only trigger once.
I'm not sure why you've added the comparison on the same JQL you're using in your lookupIssues. Were you trying to check if there are issues returned? If that's the case, use the comparison I specified above after lookup issues but before your Slack notification
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi mate, thanks for the detailed reply. I figured where I was wrong with the help of A4J great support.
Your comments are on point.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
This and many other use-cases can now be achieved via the newly release "lookup issues" action. Documentation is available at: https://support.atlassian.com/jira-software-cloud/docs/automation-actions/
Example
1. Setup scheduled trigger
2. Select "Lookup issues" as the action and put in your JQL
3. Setup email action which can now access the data from the looked up issues (example is from when using "release version" trigger)...
Subject: So much goodness, we just released awesome app v{{version}} Content: <ul> {{#lookupIssues}} <li>{{key}} - {{summary}}</li> {{/}} </ul>
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @sreuter - I tried the above documentation but it is a little misleading. The trigger returned nothing if I used issue. and the name. (Also the documentation has an (INSERT SCREENSHOT HERE) prompt but no screen. ;-)
So what ended up working for me was this:
<ul>
{{#lookupIssues}}
<li><a href="{{url}}">{{key}} </a> | {{created.longDate}} | {{status.name}}</li>
{{/}}
</ul>
I wanted to also use priority but could never get that to work. It's not in the documentation, but figured it might work since it is a standard field in Jira. Any thoughts there?
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.
Hi @John Funk
I tried both your smart value suggestion as well as one listed above and I keep receiving blank emails.
The rule says it was successful, and I do receive one saying "Hello!" as my greeting, but no issues are listed even though I show 3 that should.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Lesly Cracchiolo I'd love to help you as I have a few of these automations working correctly with both emails and Slack notifications but I can't really give you any pointers without knowing what your rule looks like or what you're trying to put in the content of your email. Screenshots of those would be useful if you'd like help
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Agreed - screenshots are super helpful :-)
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.
Try putting the word issue in front of created and status {{issue.created.longDate}} and {{issue.status.name}}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I'm having the same problem... I also tried it with {{issue.status.name}} and all and it didn't work. But it looks like it's all set up right:
And this below is the email I'm getting:
And this is the log with the results of the query:
Any ideas?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Looks like you are missing the <ul> part
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
This is what works for me:
{{#lookupIssues}}
* <a href={{url}}>{{key}}</a>: {{summary}} -- {{Story point estimate}} points ({{status.name}}, {{assignee.displayName}})
{{/}}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Gil, do you have the bulk processing option active?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Can't find where to enable it.
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.