Overview over variables/fields I can use?

Is there a complete list of variables in form of e.g. "{{issue.status.name}}" I can use? I've searched a lot online and it's really hard for me to identify such ressource.

 

Everytime I want to add something new, I have to painstakingly trial and error before I find the right value.

 

For example, at the moment I'd like to do something only if the type of the issue is a specific value, but it doesn't seem to be {{issue.type.name}} or {{issue.fields.type}} .

 

 

2 answers

1 vote

Hello,

it would be {{issue.issuetype.name}}

I found it from Jira Api. But not all works. 

Thanks! Good hint - the API. Could you nudge me in the right direction or give me a URL where you found it? 

You can begin from Issue class. You can find documentation here

https://docs.atlassian.com/jira/7.2.2/com/atlassian/jira/issue/Issue.html

Take any method which begins with get, skip the get part and put the rest to the lowercase. For example, getIssueType(). It will be issuetype. Then it returns IssueType class. You can find documentation about IssueType class here

https://docs.atlassian.com/jira/7.2.2/com/atlassian/jira/issue/issuetype/IssueType.html

IssueType class has method getName(). You have again to skip get part and put Name to lowercase. In the end you will get

issue.issuetype.name

But as I told you before not everything works like this.

1 vote

I think that the Automation plugin documentation has a pretty comprehensive list of these values/examples you can use, check out Automation for Jira Documentation: Smart Fields.

Cheers,
Andy

I've seen this, thanks. But it only got "examples" and it doesn't give me a clue what the other variables could be called at all.

Instead of examples, it would help me (and probably others) a lot to get a complete list.

Suggest an answer

Log in or Sign up to answer
Community showcase
Published Nov 29, 2018 in Marketplace Apps

How to set up an incident workflow from the VP of Engineering at Sentry

Hey Atlassian community, I help lead engineering at Sentry, an open-source error-tracking and monitoring tool that integrates with Jira. We started using Jira Software Cloud internally last year, a...

1,428 views 0 8
Read article

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you