I was wondering if there was a way to have the Jira Script Runner allow some sort of user input whether in the form of when entering the file location and then adding the input ie “C:/fakepath/myScript.groovy -my input”
Even better would have it create a input box.
I am asking because I want to create a script to create a bunch of jira issues base upon the user input. I realize I could just create a string instead of the user input and then just edit the code each time I use it, but it would be much more efficient if I didn’t have to do that. If groovy in jira can do such a thing that would be great.
I tried using the following:
BufferedReader br = new BufferedReader(new InputStreamReader(System.in))
print "Input:"
def userInput = br.readLine()
println "You entered: $userInput"
but it just constantly runs waiting for the user input, but nothing pop-ups where I could enter it.
Thanks for the help!
The following code works
My guess is your program is waiting for input, but it has not printed the message due to buffering.