[JIRA] (JENKINS-60160) Text Parameter input field displayed as single string

7 views
Skip to first unread message

michael.kostukov@gmail.com (JIRA)

unread,
Nov 13, 2019, 5:19:03 PM11/13/19
to jenkinsc...@googlegroups.com
Michael Kostukov created an issue
 
Jenkins / Bug JENKINS-60160
Text Parameter input field displayed as single string
Issue Type: Bug Bug
Assignee: Sam Van Oort
Attachments: image-2019-11-13-17-14-35-178.png, image-2019-11-13-17-16-37-752.png
Components: pipeline-stage-view-plugin
Created: 2019-11-13 22:18
Environment: jenkins 2.176.3
pipeline-stage-view 2.12
Priority: Major Major
Reporter: Michael Kostukov

We use TextParameterDefinition to obtain a commit message for the deployment stage. The following code is used to obtain the message

  

stage ('Approval (Dev)') {
            milestone 1
            
            timeout(time:5, unit:'DAYS') {
                commitMessage = input (id: 'userInput', message: "Approve build for Dev?", parameters: [
     				[$class: 'TextParameterDefinition', defaultValue: """${commitMessage}""", description: 'Change Summary', name: 'comment'],
                	])
            }
            milestone 2

            deploymentApproved = true
        }

 

TextParameterDefinition is supposed to produce a multi-line input field, but instead, single-line text input is shown - resulting in all newline characters being ignored and the entire commit message being "smushed" into a single line:

Note that the same field is shown correctly in Blue Ocean UI:

 

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

michael.kostukov@gmail.com (JIRA)

unread,
Nov 13, 2019, 5:20:02 PM11/13/19
to jenkinsc...@googlegroups.com
Michael Kostukov updated an issue
Change By: Michael Kostukov
Attachment: image-2019-11-13-17-19-08-841.png
We use TextParameterDefinition to obtain a commit message for the deployment stage. The following code is used to obtain the message

  
{code :java }

stage ('Approval (Dev)') {
            milestone 1
            
            timeout(time:5, unit:'DAYS') {
                commitMessage = input (id: 'userInput', message: "Approve build for Dev?", parameters: [
         [$class: 'TextParameterDefinition', defaultValue: """${commitMessage}""", description: 'Change Summary', name: 'comment'],
                 ])
            }
            milestone 2

            deploymentApproved = true
        }
{code}

 

TextParameterDefinition is supposed to produce a multi-line input field, but instead, single-line text input is shown - resulting in all newline characters being ignored and the entire commit message being "smushed" into a single line:

!image-2019-11-13-17- 17 19 - 38 08 - 448 841 .png!


Note that the same field is shown correctly in Blue Ocean UI:

 

!image-2019-11-13-17-16-37-752.png!

michael.kostukov@gmail.com (JIRA)

unread,
Nov 13, 2019, 5:20:02 PM11/13/19
to jenkinsc...@googlegroups.com
Michael Kostukov updated an issue
Change By: Michael Kostukov
Attachment: image-2019-11-13-17-14-35-178.png

michael.kostukov@gmail.com (JIRA)

unread,
Nov 13, 2019, 5:23:02 PM11/13/19
to jenkinsc...@googlegroups.com
Michael Kostukov assigned an issue to Unassigned
Change By: Michael Kostukov
Assignee: Sam Van Oort

michael.kostukov@gmail.com (JIRA)

unread,
Nov 21, 2019, 12:36:02 PM11/21/19
to jenkinsc...@googlegroups.com
Reply all
Reply to author
Forward
0 new messages