Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

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
TAGS
atlassian, team ’25 europe, early bird extension, conference discount, barcelona, hybrid event, AI teamwork, early bird pass, digital access, collaboration conference, atlassian events, register now, developer conference

1 week left to save on your Team '25 Europe pass

Still thinking about joining us for Team '25 Europe? Early bird has been extended for just one week! Now’s the time to lock in your lowest rate. Use code TEU25COMM-20 to save 20% at checkout. Hurry, this only lasts for 1 more week.

Learn more
AUG Leaders

Atlassian Community Events