Forums

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

Automation Issue: Custom Field Not Storing Branch Name

Ben Wilbers October 7, 2024

Hi Jira Community,

I’m hoping someone here can help with an issue we’re encountering with an automation rule in JIRA. We’ve set up an automation that should capture the name of a branch when it is created and store this value in a custom field within the linked JIRA issue. This step is crucial for us, as we need to use this variable outside of the initial automation, specifically in a webhook integration.

Scherm­afbeelding 2024-10-07 om 12.10.30.png

The automation rule appears to run smoothly—each time it’s triggered, the audit log shows that the rule has succeeded.

Scherm­afbeelding 2024-10-07 om 12.11.07.png

However, the result is always an empty variable in the custom field. This is causing us some headaches, as the empty value leads to a failure (422) in the webhook.

Scherm­afbeelding 2024-10-07 om 12.12.32.png

It’s frustrating because the webhook integration is a key part of our process, and without the branch name being stored correctly, we can’t move forward.

ededede.png

Has anyone else encountered a similar issue, or could provide guidance on how to resolve this?

Thanks so much in advance for any insights or advice!

2 answers

1 accepted

2 votes
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.
October 7, 2024

Hi @Ben Wilbers 

When a variable is created within an automation rule, that only exists within the scope of that rule's execution.  It is not available to other rule executions.

I believe the only workaround for your scenario would be to store the value, either in a specific issue's custom field (by branching to it) or in a project entity property for later use in the other rule.

Kind regards,
Bill

Ben Wilbers October 8, 2024

I've created a custom (read only) text field which works. Thank you @Bill Sheboy

Like Bill Sheboy likes this
0 votes
Max - SwiftSprint dev
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.
October 7, 2024

Hi @Ben Wilbers ,

 

in the documentation https://support.atlassian.com/cloud-automation/docs/jira-smart-values-development/  I can see that {{createdBranch}} Smart Value is used in Bitbucket, Gitlab, etc. 

For Jira Trigger they have {{branch.name}}. Could you please try to use {{branch.name}} instead of {{createdBranch.name}}?

Ben Wilbers October 7, 2024

@Max - SwiftSprint dev I've tried to use {{branch.name}} instead of {{createdBranch.name}}, to no avail.

Suggest an answer

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

Atlassian Community Events