issue resolution checking in jira plugin development

AbrahamA
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.
December 4, 2011

Hi

I need to check for issues with resolution "UNRESOLVED" and status not closed.

I tried this:

if( !issue.getStatusObject().getName().equalsIgnoreCase("Closed")
					&& (issue.getResolution()== null) ){
Do Something
}

Now an issue with resolution "UNRESOLVED and status "InProgess" is not entering the do something block.

Can you please tell me where I went wrong.

Per my understanding if resolution is UNRESOLVED, issue.getResolution returns null. Because I got Null pointer exception when I tried issue.getResolutionObject().getName() on issue for which Resolution is UNRESOLVED. Is this understanding correct?


Thanks

Abe

1 answer

0 votes
RambanamP
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.
December 4, 2011

issue.getResolution() will return Generic Value so you can't use condition like (issue.getResolution()== null)

use it as follows

(issue.getResolution().get("name")==null) i think it should work

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events