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:
Thanks in advance!
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
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?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Dear @Tuncay Senturk the last action to send web request with PUT method hits an error below:
Please enter a valid web request URL
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Sorry, have you tested
https://your-domain.atlassian.net/rest/api/3/version/{{version.id}}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
Thanks in advance!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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")}}
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.