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

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

XMLWordPrintable

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

      Problem
      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.

      Workaround
      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.

      Good:

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

      Bad:

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

        1. jenk3-slaves-problem.png
          7 kB
          Matt Legrand
        2. ShowsBadLabelDescription.PNG
          60 kB
          Matt Legrand
        3. ShowsBadLabelDescXML.PNG
          110 kB
          Matt Legrand

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

              Created:
              Updated: