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
Alexey Matveev Community Champion Nov 22, 2017

Hello,

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

Alexey Matveev Community Champion Nov 22, 2017

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? 

Alexey Matveev Community Champion Nov 23, 2017

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
Atlassian Community Anniversary

Happy Anniversary, Atlassian Community!

This community is celebrating its one-year anniversary and Atlassian co-founder Mike Cannon-Brookes has all the feels.

Read more
Community showcase
Bridget Sauer
Published Thursday in Marketplace Apps

Calling all developers––You're invited to Atlas Camp 2018

 Atlas Camp   is our developer event which will take place in Barcelona, Spain  from the 6th -7th of   September . This is a great opportunity to meet other developers and get n...

264 views 0 6
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