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

Entering a newline in a Label description makes "slave" matrix axis unavailable


    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Minor Minor
    • core, matrix-project-plugin

      If a newline is present in a Label description (), the matrix job configuration "Slaves' option will not be selectable (jenk3-slaves-problem.png). No error is seen in the log files.

      To reproduce
      1). Create a Jenkins slave (if needed). Add a label to that slave MY_LABEL. Edit the label's description as follows:

       "This is 
      a newline in the description"

      2). Create a new Multi-configuration project
      3). Attempt to add a "Slaves" axis. The expected dropdown will not appear and it won't be possible to add a Slaves axis.

      Possible cause
      in (JENKINS_HOME)/labels/label.xml, the tags <description> and </description> must be on the same line. The newline in the description adds a newline before the </description> tag above, which seems to cause the matrix job problem as described above. Please see attachments for an example.

      Avoid newlines in the Label description. HTML is permissable there.
      Simple guideline: do not enter a newline when making a label description. One MAY use html <br> and other HTML tags.


      This is <b>my</b> name,<br>Matt


      This is my name,
      <a newline here causes this issue>

            kohsuke Kohsuke Kawaguchi
            mmlegra Matt Legrand
            6 Vote for this issue
            6 Start watching this issue