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
How to earn badges on the Atlassian Community

How to earn badges on the Atlassian Community

Badges are a great way to show off community activity, whether you’re a newbie or a Champion.

Learn more
Community showcase
Published May 30, 2018 in Marketplace Apps

Three tips for boosting your board's efficiency with Story Maps

Trello is one of the most effective tools for driving your sprints. It's customizable for every Agile team and product owners and Scrum masters (SM) love it. However, Agile teams often struggle with:...

829 views 2 9
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