[JIRA] (JENKINS-57498) string value in Groovy script in Reactive Choice parameter replaced with null when approved in in-process script approval

6 views
Skip to first unread message

nilesh.nida@gmail.com (JIRA)

unread,
May 16, 2019, 3:07:02 AM5/16/19
to jenkinsc...@googlegroups.com
nimesh saman created an issue
 
Jenkins / Bug JENKINS-57498
string value in Groovy script in Reactive Choice parameter replaced with null when approved in in-process script approval
Issue Type: Bug Bug
Assignee: Bruno P. Kinoshita
Components: active-choices-plugin
Created: 2019-05-16 07:06
Priority: Blocker Blocker
Reporter: nimesh saman

My reactive choice parameter groovy script is following 
def command = ["/bin/bash", "-c", "git ls-remote --tags " + repourl]
def process = command.execute()
process.waitFor()
def t1 = []
def result = process.in.text.tokenize('
n')

for(i in result)
{
def tagName = i.split()[1].replaceAll('\\^{
}','').replaceAll('refs/tags/', '')

t1.add(tagName)
}

return t1

 

But when I check this script in in-process script approval it looks like this 

def command = ["/bin/bash", "-c", "git ls-remote --tags " + repourl]
def process = command.execute()
process.waitFor()
def t1 = []
def result = process.in.text.tokenize("
")
for(i in result)
{
def tagName = i.split()[1].replaceAll('^{}','').replaceAll('refs/tags/', '')
t1.add(tagName)
}

And when I approved it this script contains error 
I am blocked here 

Add Comment Add Comment
 
This message was sent by Atlassian Jira (v7.11.2#711002-sha1:fdc329d)

imoutsatsos@msn.com (JIRA)

unread,
Dec 21, 2019, 9:21:02 PM12/21/19
to jenkinsc...@googlegroups.com
Ioannis Moutsatsos commented on Bug JENKINS-57498
 
Re: string value in Groovy script in Reactive Choice parameter replaced with null when approved in in-process script approval

nimesh saman I'm suspecting that the code peculiar formatting  is causing some display issues with the widget used in the Jenkins UI widget for the script approval. I have run into a similar issue with code that looks like html textarea in the Scriptlet plugin Groovy editor

This message was sent by Atlassian Jira (v7.13.6#713006-sha1:cc4451f)
Atlassian logo

kxjooho@gmail.com (JIRA)

unread,
Dec 22, 2019, 9:24:04 PM12/22/19
to jenkinsc...@googlegroups.com

kxjooho@gmail.com (JIRA)

unread,
Dec 22, 2019, 9:24:05 PM12/22/19
to jenkinsc...@googlegroups.com
juho sung started work on Bug JENKINS-57498
 
Change By: juho sung
Status: Open In Progress
Reply all
Reply to author
Forward
0 new messages