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
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/
Earlier it was returning the value, but not its returning empty.
I would like to know the reason. Is there alternative way.?
Hi @shriya
Please post an images of the following to provide context for what you are observing:
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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:
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?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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/
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.