Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-60160

Text Parameter input field displayed as single string

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Major Major
    • None
    • jenkins 2.176.3
      pipeline-stage-view 2.12

      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:

       

            Unassigned Unassigned
            r0ll1ngst0ne Michael Kostukov
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: