Forums

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

This automation doesn't work: detect deployment to production from specific branches

Francisca Fuentes
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
March 19, 2025

Hi, I am trying to make an automation in which when a deployment to production is made from the preview and development branches, the issue goes to Done state, but it does not work.
Screenshot 2025-03-19 at 17.16.42.png

1 answer

1 vote
Philipp Sendek
Contributor
March 19, 2025

Hi @Francisca Fuentes ,

welcome to the community! :-) 

So the regular expression looks okay, I would say. If things look good but don't work, I usually place "Log action" elements before the condition and print the value of the smart value I'm using. That way I can see what the value was during runtime and see it is what I expected.

So in your case, you can place a "Log action" action above the "If: Compare two values" and use the following text: "Source Branch: {{pullRequest.sourceBranch}}".

Maybe it's empty? Or has an ID instead of a name as value?

If it has indeed either development or preview as values, you could replace the "If: Compare two values" with an IF branch and create two separate conditions that match by exact name. That would also rule out that there's an issue with the regular expression.

I hope that helps!

Greetings
Philipp

Francisca Fuentes
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
March 21, 2025

Oh, thank you so much Phillipp! I'll try all that! :)

Suggest an answer

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

Atlassian Community Events