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

This issue is archived. You can view it, but you can't modify it. Learn more

XMLWordPrintable

    • Type: Bug
    • Resolution: Unresolved
    • Priority: Minor
    • Component/s: core, matrix-project-plugin
    • Environment:

      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 
      

            Assignee:
            Kohsuke Kawaguchi
            Reporter:
            Matt Legrand
            Archiver:
            Jenkins Service Account

              Created:
              Updated:
              Archived: