Jira Cloud Automation - To automate release of fix version and send email to recipient

Jeff Boon
Contributor
October 14, 2024

Hello Jira Community,

I am looking to set up a Jira Cloud automation rule that will help streamline our release process. Here's what I want to achieve:

  1. Automated Fix Version Release:
    • I want the fix version to be automatically released one day after the scheduled release date.

  2. Sending Release Notes:
    • Once the fix version is released, I want to send the release notes (or details of the issues included in that version) to a predefined list of recipients. This would ideally be a summary of the issues resolved in that fix version (e.g., all issues tied to the version), sent via email to relevant stakeholders.

 

Thanks in advance!

4 answers

1 vote
Marc - Devoteam
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 15, 2024

HI @Jeff Boon 

for you first question, you can look at this comnunity thread that should explain how this can work via automation

Jira-Automation-How-to-quot-release-quot-a-fixed-version-a-day 

The second question should be answered in this post.

How-to-add-Release-Notes-via-Smart-Values-to-an-automated-email 

 

@Bill Sheboy thanks for the provided solutions

0 votes
Jeff Boon
Contributor
October 18, 2024

Dear @Tuncay Senturk , I believe we are almost there.

For the last web request I am hitting below error:
405 - Method Not Allowed

How should I proceed?

Tuncay Senturk
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
October 18, 2024

This is the updating version REST API, isn't it?

405 means that you are using an Http method which is not allowed. In this case it should be PUT (as documented here).

Please make sure that you are using the correct URL and HTTP method.

0 votes
Jeff Boon
Contributor
October 16, 2024

Dear @Tuncay Senturk the last action to send web request with PUT method hits an error below:

Please enter a valid web request URL
swwg6Zc5Ac.png


Tuncay Senturk
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
October 16, 2024

Sorry, have you tested 

https://your-domain.atlassian.net/rest/api/3/version/{{version.id}}
0 votes
Tuncay Senturk
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
October 15, 2024

Hi @Jeff Boon 

 

It is tricky but here is what I'd do to automate the release of a fix version based on the scheduled release date. Since it is not straightforward with Jira Cloud's built-in automation features (afaik there is no direct access to the release date),  we can use Jira's REST API within the automation rule.

 

Set up the Scheduled Trigger that runs daily at a specified time (e.g., 10:00 AM).

- Add an action choosing "Send web request" to call Jira REST API which retrieves all versions for your project

Method: GET
URL: https://your-domain.atlassian.net/rest/api/3/project/{projectKey}/versions

- Add an action "FOR EACH: Add a branch" - Branch rule / related issues 

 Condition: Inside the branch, add a condition to check if the version's releaseDate equals {{now.minusDays(1).jiraDate}}.

 

- Update the Version to be Released

  add an action within the branch, "Send web request" action to update the version's status to released.

 

Method: PUT
URL: https://your-domain.atlassian.net/rest/api/3/version/{{versionId}}
Content-Type: application/json Body: { "released": true, "releaseDate": "{{now.jiraDate}}" }

 

- Sending release notes (this will be a separate trigger)

- trigger: "Version released" 

- Add a "Lookup issues" action with the JQL:

fixVersion = "{{version.name}}"

 

- add a "Send email" action with the following configurations:

To: enter emails here

Subject: Release Notes for Version {{version.name}}

Body:

Hello,

The version **{{version.name}}** has been released.

Here are the issues included in this release:

{{#lookupIssues}}
- [{{key}}] {{summary}}
{{/}}

Best regards,
Magnificent Team

 

I hope this helps!

Tuncay

Jeff Boon
Contributor
October 15, 2024

Dear @Tuncay Senturk thanks for the detailed step by step, but I am stucked at the Conditioning statement below:

Condition: Inside the branch, add a condition to check if the version's releaseDate equals {{now.minusDays(1).jiraDate}}.

May I know how do I achieve the above in jira automation?

Below is what I've setup for now.

2oOcXowVoh.png
Thanks in advance!

Tuncay Senturk
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
October 15, 2024

You are correct; I overlooked that part.

Add advanced branching to iterate over the web response.

new action, choose Advanced branching

 

smart value: 

{{webResponse.body.fromJson}}

variable name:

version

then add if condition in which 

first value:

{{version.releaseDate}}

condition: equals

second value:

{{now.minusDays(1).format("yyyy-MM-dd")}}

Let me know if I wasn't clear. 

btw: I haven't tested it; I just wanted to shed some light on how to achieve this. 

Jeff Boon
Contributor
December 4, 2024

Hi greetings @Tuncay Senturk , I hope you can help me out on this. I've managed to retrieve all fix versions and managed to PUT all fix versions to release. But I have condition is that I only want to update last week's Wednesday fix versions to Released. 

But at the moment the condition check is not working, as the automation updates all Unreleased fix version to Released.


Thanks in advance!

8XME3vohub.pngwp64KZDtXN.png

Tuncay Senturk
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
December 5, 2024

I am not sure but did you try also formatting the version?

 

{{version.releaseDate.format("yyyy-MM-dd")}} equals {{now.minusWeeks(1).startOfWeek.plusDays(2).format("yyyy-MM-dd")}}

Suggest an answer

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

Atlassian Community Events