Forums

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

ScriptRunner : To check Issue type

Aishwarya Rajan March 26, 2018

Hi..I need to check if the issueType is a story or a subtask..for that matter..I need to check the issueaType and add that condition in groovy script. 

 

I used getIssueType() == "Story"

and getIssueType().getName() == "Story"

 

neither of them seem to be working. I cannot use issue.issueTypeObject.name == ''Story" as I am using a version above 7.0. Any leads regarding the same?

 

1 answer

1 accepted

4 votes
Answer accepted
Alexey Matveev
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.
March 26, 2018

What do you mean it is not working.

Try to log to the log file the value of getIssueType().getName() 

log.error(issue.getIssueType().getName() )

and see its value.

Suggest an answer

Log in or Sign up to answer