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, mindful member, mindful member badge, atlassian community, community kudos, community giveaway, atlassian swag, community values, empathy and kindness, badge challenge, atlassian learning, community engagement, swag giveaway

Earn a Badge, Win a Prize 🎁

Earning the Mindful Member badge proves you know how to lead with kindness, plus it enters you into a giveaway for exclusive Atlassian swag. Take the quiz, grab the badge, and comment on our announcement article to spread the good vibes!

Start here
AUG Leaders

Atlassian Community Events