Forums

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

How to check the create, edit, view, transition of issues in the scriptrunner's behaviours.

Jee young-hoon May 15, 2018

I don't want to run behaviours when I edit issues.
But I don't know how to get state.
help me plz...

1 answer

1 accepted

1 vote
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.
May 15, 2018

You should write like this:

if(getAction() !=null) {

//your code here

}

You can find more info on getAction method here:

https://scriptrunner.adaptavist.com/latest/jira/behaviours-api-quickref.html#_getaction

Jee young-hoon May 15, 2018

Thanks

create issue returns two things : action name and null.

but It was run regardless.

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.
May 15, 2018

I just checked and the Create issue event always returns Create. Could you provide logs and your final script?

Jee young-hoon May 15, 2018

previously confirmed script is simple.
just
log.debug(getAction())
it was displayed two things.
nothing has been touched, but It is now displayed as one.

It was very kind of you to help me. Thanks.

Suggest an answer

Log in or Sign up to answer