Send a list of issues in Slack with Jira automation’s newest action (Cloud)

53 comments

Tom Williams
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
July 30, 2020

@Sam Harding Thanks for spotting that! damn capitalisation!! 

Like Sam Harding likes this
blemasle July 30, 2020

@Sam Harding You might want to update your doc then, because it says otherwise :)
I didn't even try it because of this :(

https://support.atlassian.com/jira-software-cloud/docs/automation-actions/#Automationactions-Lookupissues

"Use smart values here: No"


Thanks for the heads up!

Like Sam Harding likes this
Sam Harding
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
July 30, 2020

@blemasle Thanks for pointing that out, we'll fix that up. Sorry for confusion caused here! Cheers

Tom Wilson August 11, 2020

Is there any way to add in formatting?

https://api.slack.com/reference/surfaces/formatting#visual-styles

 

Trying to bold a specific text and it's not working as expected

 

*bold*{{version.description}}*bold*

results in this being sent to slack..

*bold*version description here*bold*

Tom Williams
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
August 11, 2020

Hi @Tom Wilson 

it’s *{{version.description}}*

Tom Wilson August 11, 2020

@Tom Williams That worked!  Is there a reference guide for how to format messages to slack? 

Tom Wilson August 13, 2020

I can't see to get issueType to display during my automation inside look up values.

here is all the options i tried, but getting empty string when it prints out to slack..

---- [{{issueType.name}}] - [{{issueType}}] -[{{issue.issueType.name}}] - 

Anyone else have this problem? 

Tom Williams
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
August 13, 2020

Hey @Tom Wilson 

I had the same issue, looks like the documentation is incorrect and it should be {{issuetype}} so to get the name would be {{issuetype.name}} 

Michael October 21, 2020

I am having a hard time getting this to work as expected. I am sending a daily email with this is the email body:

<ul>
{{#lookupIssues}}
<li>{{key}} - {{summary}}</li>
{{/}}
</ul>

I have tried several variations of  {{#lookupIssues}} } {{/}} but have had no success. For me, I receive multiple emails. For example, if my JQL returns 5 issues, I receive 5 emails. Am I missing something?

Neetu Verma October 21, 2020

Michael,

May you please put a screenshot of your rule.

 

This is how mine is set and I only get one email

{{#lookupIssues}}
| {{url}} | {{key}} | {{status.name}} | {{issuetype.name}} | {{summary}}
{{/}}

Michael October 21, 2020

@Neetu Verma 

Screenshot 2020-10-21 170606.png

JQL:

project = EZ AND Sprint in openSprints() AND status not in (Open,Done) AND timespent is EMPTY

 Email:

<ul>
{{#lookupIssues}}
<li>{{key}} - {{summary}}</li>
{{/}}
</ul>
Tom Williams
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
October 22, 2020

Hi @Michael , 

Simple fix! You need to move the JQL from the Schedule Trigger and add the "Lookup Issues" action before the email send action.  

Like Neetu Verma likes this
Michael October 22, 2020

@Tom Williams I’m not sure I understand your solution. Can you give me an example or screenshot?

Tom Williams
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
October 22, 2020

@Michael here you go. 

Screenshot 2020-10-22 142049.png

Michael October 22, 2020

@Tom Williams Thank you! This fixed my issues.

I guess I should have paid closer attention to this checkbox "Run a JQL search and execute actions for each issue in the query" haha.

Thanks again.

Like Tom Williams likes this
Neetu Verma October 22, 2020

Yep, just move email as an action item

Nofar Ben Kereth November 1, 2020

Hey!

 

You wrote - ". It could also mean commenting, transitioning, or updating every issue in the list. Magic!"

 

How can edit a field for all issues in the list? I couldn't find a solution that doesn't include Scheduled Trigger. I would like to use it with Manual Trigger or use it as an post action for another rule (for example - after sending the Slack message with the list of issues, change a custom field value for all issues in list).

 

I can't seem to find a solution anywhere

Jibu Chacko December 14, 2020

@Tom Williams I have used the below JQL 


status != Done AND created >= "-7d" AND created <= "-1d" AND NOT status changed

 

Where I get 4 issues when I validate

I am trying to send the same to slack. 

When I use the below 

<{{#issues}}{{url}}|{{key}} - {{summary}}{{/}}>

It works fine. I get the URLs printed 

But when I use

{{#lookupIssues}}{{key}}{{/}} 

Even if I use {{lookupIssues.size}}  it prints 4 blank lines It prints 4 empty lines.

 

What am I doing wrong here? I am on the Jira Cloud Enterprise version

Deleted user January 20, 2021

Is the {{#lookupIssues}} feature supported on Jira Automation for Server already? 

Martin Cleaver
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
March 8, 2021

 Jun 28, 2020 This new feature is unfortunately only available for the Cloud version of Jira automation right now (as opposed to the Automation for Jira app) 

@John McKiernan 

  1. When will it be available for DC? I can understand some lag, but June '20 to March '21 is more than a little time for your biggest customers to wait.  
  2. What is the workaround? 

Thanks, Martin.

Christian Macedo March 12, 2021

Is it possible to filter or perform a group by on the {{#lookupIssues}} list?

I want to send out an email for each release which separates out bugs, stories and tasks. Similar to the below rather than as a single long list.

 

Bugs:

  • Bug 1
  • Bug 2

Stories:

  • Story 1
  • Story 2

Tasks:

  • Task 1
Like maricris.macha likes this
Darrin Lange March 12, 2021

@Christian, I ended up having separate rules for each group.  

Christian Macedo March 12, 2021

@Darrin Lange 

 

Is there no way to get the three groups into a single email?

 

I'm attempting to figure this out but just can't. The closes I can get to filtering on lookup issues is as below. 

 

<ul>
{{#lookupIssues}}
    {{issuetype.name}} //Just prints it to make sure there's nothing wrong with the list
    {{#if(issuetype.name.equals("Bug"))}}
        <li><a href="{{issue.url}}" target="_blank">{{key}}: {{issuetype.name}} - {{summary}}</a></li>
    {{/}}
{{/}}
</ul>

 

This only prints the issuetype.name from just inside the {{#lookupIssues}} loop. It doesn't seem to enter the #if.

Darrin Lange March 12, 2021

Hi @Christian Macedo , I wasn't able to get that to work either. Instead of using the #if, incorporate your issuetype = Bug into your lookupissues JQL. Then, create a new rule for each issue type you want to push to Slack. 

Christian Macedo March 12, 2021

@Darrin Lange That's the issue. I want to have these all grouped in a single email. Not slack. 

Comment

Log in or Sign up to comment
TAGS
AUG Leaders

Atlassian Community Events