Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,361,259
Community Members
 
Community Events
168
Community Groups

Access to development-wise smart values in Jira Automation

Jira automation users tend to miss out that smart values - development (i.e., branch, commit, pull request) are only available via the DevOps triggers. I was one of those, to be honest. This article introduces a tip on how to make it accessible via any triggers such as the "Scheduled".

 

(1) Create a trigger

As an example, I'll make the commit URL accessible in a component hooked by any triggers. As mentioned before, those development-wise smart values are only available via the trigger corresponding to the entity which you want to access. That means, in my case, I need to choose the "Commit created".

devops-triggers.png

(2) Set entity property

Then set the value {{commit.url}} as an issue property. You can name the key whatever you want. That is it! As the entity property is accessible via any triggers, now you can retrieve the latest commit URL at any component. For instance, you can refer to the stored value with {{issue.properties.commitUrl}}.

set-issue-entity.png

 

(3) Optional: how to debug the rules

I recommend you to place the "Log action" in case you need to debug the rule.

audit-log.png

 

Feel free to post a comment if you found anything unclear.

2 comments

M Amine Community Leader Sep 26, 2020

thank you @K_ Yamamoto for this great tip. Automation is really helpful.

Like K_ Yamamoto likes this

is there a way to get the branch name where the commit has been made during a commit created trigger?

Comment

Log in or Sign up to comment
TAGS

Atlassian Community Events