Forums

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

Scriptrunner - Clones an issue, and links : Add condition based on Custom field

Veera Nanduri
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
December 12, 2022

Hello,

I'm using the ScriptRunner plugin and using the post function "Clones an issue and links".

I have three projects - Project A, B and C. When i create a ticket in Project A, based on the custom field value it should create an issue in either Project B or Project C.

So for this, I'm using condition as - 

cfValues['Security Component'] == 'Tenable'
Here is the screen shot
image.png
Also i've tried 'IssueCreated' event in the Post function and created a Listener, but this one too not worked. I'm still new to the Scriptrunner and Groovy. Appreciate your help.

1 answer

1 accepted

1 vote
Answer accepted
Florian Bonniec
Community Champion
December 12, 2022

Hi @Veera Nanduri 

I think your condition is wrong.

What is the type of Security Component Field ?

If it's a select list it should be:

 

cfValues['Security Component']?.value == 'Tenable'
Regards
Veera Nanduri
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
December 13, 2022

Oh, that's my bad! Thank you so much. It worked.

Suggest an answer

Log in or Sign up to answer