command if ($issue.getIssueType() == 'Issue Type' not working

Shamith K S August 5, 2011

if ($issue.getIssueType() == '1')

i am using it in one description.vm file. but its not working. anyone knws y ?

thnks in advance..

1 answer

0 votes
Nic Brough -Adaptavist-
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
August 5, 2011

You need to read the API to see what it's doing. You've actually got two problems (note - I'm working on 4.0 at the moment, so I'm using the 4.0 API, you should use the correct API)

http://docs.atlassian.com/jira/4.0.2/ and look for the "Issue" object

The first problem is that getIssueType is deprecated and you should really be using getIssueTypeObject . Whichever method you use, you'll see that both calls return an object, not a string or number. What you need to do is read that for your issue type.

i.e. you really need $issue.getIssueTypeObject().getId or even $issue.getIssueTypeObject().getName might be more useful

Shamith K S August 5, 2011

Thnks a lot Nic. I will look into that.

Suggest an answer

Log in or Sign up to answer