Automation - when version released post release notes to slack

Nick Phillips June 24, 2020

Spending some time setting up JIRA Automation which will save many man hours! Very exciting new feature.

 

Aiming to create a rule which 'When: Version released' it posts a message to our #releases slack channel.

 

Is it possible to retrieve the release notes in text format within the 'Send Slack message' actions Message box?

 

 

3 answers

1 accepted

5 votes
Answer accepted
Bill Sheboy
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.
June 24, 2020

Hi @Nick Phillips 

Yes, you can do that.

Trigger on the version release and then use JQL to get the associated issues, if you want to include those.  To see what is available for the version smart value, please see:

https://support.atlassian.com/jira-software-cloud/docs/smart-values-general/

If you cannot see what you want, consider using the REST API to grab an example version and see if other attributes are available:

https://support.atlassian.com/jira-software-cloud/docs/find-the-smart-value-for-a-field/

 

Best regards,

Bill

Alex Romano July 20, 2020

@William Sheboy  

For the JQL for the associated issues, what function can I use to query for only the version which was released, or does the trigger sort that out for me?

Bill Sheboy
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 20, 2020

Hi @Alex Romano 

The trigger provides the version that you use in the query.  Here is what worked for me in a test...

  • Trigger: version released
  • Action: lookup issues, using the query below.  Note the quotes around the version in order to handle any version names which have embedded spacing.
project = myProject AND fixVersion = '{{version.name}}'
  • Action: add however you want to send the notification to provide the list.  I tried an email including the following to build an HTML list of the looked up issues.
Release {{version.name}} included these items:

<ul>
{{#lookupIssues}}
<li><a href="{{url}}">{{key}}</a>: {{summary}}</li>{{/}}
</ul>

 

Best regards,

Bill

Like # people like this
Joey Klein October 14, 2020

worked like a charm.  Thanks @Bill Sheboy 

Like Bill Sheboy likes this
Bill Sheboy
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 14, 2020

Hi @Joey Klein  -- Welcome to the Atlassian Community!

I am glad that worked for you.

__Bill

Avril Pinto July 28, 2021

On release, I am trying to post a comment to the JIRA released but on saving the below it throws an error. Any clues?

Capture.JPG

Bill Sheboy
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 29, 2021

Hi @Avril Pinto -- Welcome to the Atlassian Community!

What is the error message that shows next to that trigger?

Best regards,
Bill

0 votes
kirill_lapshin October 21, 2022

@Bill Sheboy @Joe Miller hello,

Is it possible to send the link for Jira release notes into Slack channel?

Could you possibly share the message for Jira Automation "When a version is released → then send a Slack message" for such case?

version {{version.name}} was released on {{version.releaseDate.mediumDate}} just returned a simple text.

Bill Sheboy
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 21, 2022

Hi @kirill_lapshin 

A lot about automation rules is experimentation, and so looking around in Jira to see what might work...For example, if you go to a company-managed project's release notes page, the URL would be:

myCompanyUrl/projects/myProjectName/versions/myReleaseVersionId/tab/release-report-all-issues

If you plug in your values, from the released version and project information this could be automated with:

myCompanyUrl/projects/{{version.project.key}}/versions/{{version.id}}/tab/release-report-all-issues

Kind regards,
Bill

Like kirill_lapshin likes this
kirill_lapshin October 22, 2022

Thanks a lot @Bill Sheboy . It works :)

Like Bill Sheboy likes this
0 votes
Joe Miller May 12, 2022

I'm trying that same content in an email content section.

 

Release {{version.name}} included these items:

<ul>
{{#lookupIssues}}
<li><a href="{{url}}">{{key}}</a>: {{summary}}</li>
{{/}}
</ul>

 

I get the first line "Release..." but not the list.  Any ideas?

Bill Sheboy
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.
May 12, 2022

Hi @Joe Miller 

Please post an image of your complete rule and the audit log showing the details where the rule did not work as expected.  That will provide context for the community to comment.

Without that information, I can hypothesize, either:

  1. You are using Lookup Issues but did not first call the Lookup Issues action with JQL to gather the issues...or...
  2. You are using Jira Server/Data Center and those do not support the Lookup Issues action.  In that case, try using the Bulk Handling features of scheduled triggers and branches, and use the {{issues}} smart value rather than {{lookupIssues}}

Kind regards,
Bill

Like Erxing Zhao likes this
Joe Miller May 12, 2022

Worked.  It was the lookup.  How would I make this a global automation if I'm referencing project?

Bill Sheboy
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.
May 13, 2022

Joe, I am glad to learn that helped.

Global/multi-project rules may be created by a site admin, and they can reference all or specific projects.  Some things to note if you use such rules:

  • There are limits on the number of rule executions per month for global/multi-project rules.  (Executions are essentially unlimited for project-scope rules.)  Please discuss this with your site admin to learn your limits so you do not run out.
  • You noted releases (versions) in your first post, and those are defined at a project level.  Please ensure your rule can run in different projects, and does not assume something about releases which is only valid for one project, such as the naming convention.
  • Finally, are you using company-managed, team-managed, or a mix of projects?  The differences in the project types can impact rules, such as for status information.  Please check for those things and modify your rule accordingly.

Thanks,
Bill

Erxing Zhao March 29, 2023

@Bill Sheboy Very helpful. Solved a big problem for me. Thanks a lot.

Like Bill Sheboy likes this

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
STANDARD
PERMISSIONS LEVEL
Site Admin
TAGS
AUG Leaders

Atlassian Community Events