Forums

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

why uri undeclared from scriptrunner??

hyojoon choi April 7, 2021

I'm creating a custom macro I don't know why it says uri is not declared.

image.png

Is there a problem with the code? Or can't use functional programming on the console?

 

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.
April 8, 2021

Scriptrunner allows you to run java or groovy (or a mix!), both of which are declaritive when it comes to variables - you can't just say "x = something", you need to tell the compiler that x is a variable before you can use it.

So, on line 10, it's saying you have not defined a variable called response, and the object you are trying to work with does not have it.

To me, this looks like it's because you are treating the call as though it is an iteration, which won't contain a response variable.  Try removing the "req ->" part of it.

hyojoon choi April 14, 2021

I removed it, but it's the same. Thank you for your answer.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events