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".
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".
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}}.
I recommend you to place the "Log action" in case you need to debug the rule.
Feel free to post a comment if you found anything unclear.
K_ Yamamoto
Technical Support Engineer
Atlassian, K.K.
Yokohama, Japan
10 accepted answers
2 comments