For example, I have a filter that provides me a view of all tickets that are in the code in review status for more than 2 days. I would like to automate a slack message to the team channel to include a list of all of those ticket numbers that are provided by the JQL query.
I know how to create an automated message per individual ticket, however I simply want one message to include all of the results of that query.
The slack integration only allows the ability to automate when a trigger occurs, e.g. moved to this status, which is not what I am looking for. Any suggestions?
You can do this with Automation for Jira, creating a scheduled trigger rule, use Lookup Issues with your JQL search, and send the message to Slack.
Please look here for information to get you started:
https://www.atlassian.com/software/jira/automation-template-library/slack-ms-teams
https://www.atlassian.com/software/jira/automation-template-library#/label/all/1453
Best regards,
Bill
thanks so much for responding. Unfortunately, I don't believe that this can help me. I am able to create one message per ticket, but am unable to use this to group mutlple results into one message.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi, Holly.
That is where LookupIssue can help. You use it with your JQL, and it treats the results as a set. For example, this would list the keys for them all, which could be sent in one message:
{{#lookupIssues}}
* {{key}}
{{/}}
Please look here to see which fields are available for LookupIssues:
https://support.atlassian.com/jira-software-cloud/docs/smart-values-general/
Thanks,
Bill
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Bill, I really appreciate your help, as I am new to automations, can you provide more details to help me get there?
As you can see I have this automation set (for email for testing). Where do i insert the lookup issues? I add this to the description of the email but it still sent individual emails.
Thank you so much for your help. If i could get this done, it would be so helpful for my entire company.
holly
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Sure, I will try to help with more details.
I see that you are using a JQL statement to limit your scheduled trigger in the rule. After the trigger, you may add the LookupIssues action, and use the same JQL. Then your email body may use the LookupIssues results. So your rule pieces, in order, would be:
For example, the following in your email body will give you a bulleted list of the issues with a link to each showing the Key and Summary. If you wanted something simpler, you could use my earlier example with just the Key.
<ul>
{{#lookupIssues}}
<li><a href="{{url}}">{{key}} - {{summary}}</a></li>
{{/}}
</ul>
Try this first to get it working. You can then replace (or add) the Send Slack Message action, per your question. Please see the information in that action to configure the connection to Slack.
Please let me know if this works for you.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Bill,
This is amazing! So helpful. I removed my JQL trigger, just scheduled a cron trigger, followed by the look up issues results and it worked!! Thank you so much for the detailed instructions.
The issue that I have now, is that I can't simply replicate this to send a message to slack, and need to create a webhook, which I don't know how to do. I am so close! sigh.
Thank you again for your help getting me this far.
Holly
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Holly,
I am glad to here it is working! If you look at this how-to page below, and select the incoming webhooks link, it will help you set it up for Slack messaging. If you do not have permissions, please check with whoever set up your Slack instance.
https://support.atlassian.com/jira-software-cloud/docs/use-automation-with-slack/
Best regards,
Bill
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.