Forums

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

Jira automation rule - When build is successful , how to retrieve branch information ?

shriya July 11, 2025

When build is successful, it triggers jira automation rule to pass -> branch information. I was using  {{ build.refs}} and it was working fine but suddenly it is showing empty list.

This smart value is important for my project, kindly let me know what could be the issue.

I have seen documents where they have mentioned that {{build.refs}} could be null, but it was working fine for me and suddenly it stopped.

 

Thanks,

Shriya

3 answers

0 votes
shriya July 13, 2025

Basically, I have automation rule to which is triggered when "Build is successful" . Now I am trying to read all the paramters related to {{build}}. So {{build.refs}} return branch information.

As mentioned in this link - https://support.atlassian.com/cloud-automation/docs/jira-smart-values-development/

Screenshot 2025-07-14 091322.png

Earlier it was returning the value, but not its returning empty.

I would like to know the reason. Is there alternative way.?

 

shriya July 13, 2025

Screenshot 2025-07-14 095557.png

 

Snippet of Automation rule

Like John Funk likes this
shriya July 13, 2025

Audit log -

Screenshot 2025-07-14 100544.png

0 votes
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 11, 2025

Hi @shriya 

Please post an images of the following to provide context for what you are observing:

  • your complete rule in a single image for continuity,
  • the action where you are using that smart value, and 
  • the audit log details showing the rule execution.

Until we see that...

I recall some of the smart values (including development ones) are loaded just-in-time when needed.  Thus, depending upon how your rule is using the value, it may not be available fast enough for usage. 

A workaround for this is to first store the value using Create Variable and then using the variable later in the rule.  This will force the full evaluation of the smart value before it is needed, preventing any timing problems.

Kind regards,
Bill

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 14, 2025

Please try to stay within one thread when responding.  That will help others reading this question in the future know if there are multiple possible solutions.  Thank you!

 

My suggestion was to store the {{branch}} smart value in a variable, but when you do so, it should not use the same name.  For example:

  • action: create variable
    • name: varBranch
    • smart value: {{branch}}

Then you may check if that helped by writing {{varBranch}} to the audit log.

 

And as noted in the documentation, because the information is optional for the branch, that specific smart value for the refs may be empty.  Have you looked in your source control tool to confirm if it indeed does contain information?

Like John Funk likes this
0 votes
John Funk
Community Champion
July 11, 2025

Hi Shriya,

Take a look at this document for smart values for branch information. 

https://support.atlassian.com/cloud-automation/docs/jira-smart-values-development/

 

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
FREE
TAGS
AUG Leaders

Atlassian Community Events