Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Automation help with release management

Kevin McGillicuddy
Contributor
July 18, 2022

Hey I have a automated job that runs every night at 11:30 PM that basically checks in the project if any tickets were marked as resolved for that day and if so it creates a version, edits the fix version for those tickets and then releases the version.

 

This works great if only 1 ticket was released but if 2 or more are released the release is empty 

audit log.png

here is the rule:
The JQL selection is the same in both cases

 

rule.png

 

so what I would expect is that the for each loop would suspend the automation until its done looping through 

 

can anyone provide me some help?

2 answers

1 accepted

1 vote
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.
July 18, 2022

Hi @Kevin McGillicuddy 

Too long; didn't read: this is a timing problem, which is solvable.

Branches which can occur on one-and-only-one issue (e.g. branch on parent) get run "in-line" and so the rule proceeds after the branch.  But...all other branches execute in parallel and asynchronously: there is no guarantee they will even finish before all other actions in the rule.

So for a work-around you need to capture the Created Version information so it is not released before you try to reference it as the "next unreleased version".

A few ways to try that are:

  • Complicated, slow, and will always work: REST API
    • call the REST API to get the version you just created, and
    • use that value in the branch to edit the issues
  • Simple, and will always work: dummy issue
    • create a dummy issue in the rule,
    • branch to Most Recently Created Issue to assign the next unreleased version,
    • save the {{createdIssue.fixVersion}} in a created variable
    • reference the created variable in your original branch to set the version, and
    • then delete the dummy issue at the end of the rule
  • Simple, and will probably work: update one and reuse
    • similar to the dummy issue technique, branch to the first issue found in the lookup and edit that one, exit that branch and re-branch to it again, and then grab the version to save in a created variable
    • then in your original branch there will be one fewer issue to process, and you can use the created variable for the update
    • Please note: this may also run into a timing problem if the second branch starts before the first one finishes.  Yikes!

Kind regards,
Bill

Kevin McGillicuddy
Contributor
July 18, 2022

hey @Bill Sheboy  - this is super good info, it got me going down another path and based on my maybe flawed test, works for far

 

var.png

 

The run order is still out of sorts but when I went to releases I saw them all in there - so will try it out maybe with live tickets and see what happens. I may have to come back to your drawing board if it does not work

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 18, 2022

Interesting...what are you setting that created variable to as no issues have the newly created version yet?

Kevin McGillicuddy
Contributor
July 18, 2022

So because, and this is somewhat hacky, I am using a standard for versions which is a date without a timestamp - so 07/08/2022 - so I can easily re-use this format for the variable value. People or organizations that would need more dynamic releases this would obviously not work. The automated rule will only ever run once a day so no collision issues

 

We mainly use releases/versions for communication sake - so all the issues that went live during that day get wrapped up  into 1 version for that day and we have another add-on that sends out and email summarizing changes for that day

Like Bill Sheboy likes this
0 votes
Kahlia Pyle
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
January 12, 2023

Hello! It sounds like you have a special interest in releases.

 

If so, we’d like to invite you to a private community designed to better understand our customers different software releases processes, and to share some of our release management ideas for feedback.

If this sounds like you, keep reading.

  • This community will be a place where you can ask questions, suggest ideas, and provide feedback on releases. We may also email you directly with questions outside of the online group.

  • It’s for anyone who has a role to play in preparing, planning and/or deploying a software release.

  • The community will run for about 5 months, you can stay for as little or as long as you like. 

  • The group will be managed by Kahlia Pyle, Zaki Salleh and Andrew Pankevicicius

 

Please click here if you are interested or email me at kpyle@atlassian.com

Thanks - we’re looking forward to shaping the future of Atlassian products with you!

Suggest an answer

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

Atlassian Community Events