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

plugin doesn't perform conversion for subtypes of StringParameterDefinition

      Pull request: https://github.com/jenkinsci/parameterized-trigger-plugin/pull/94

      ParameterDefinition types which extend StringParameterDefinition still need to be converted, when possible, in order to ensure correct handling of any additional logic implemented by the sub-type.

      The code change is simply to use a more exacting check then the instanceof keyword because any parameter types which sub-class StringParameterDefinition in order to avoid re-implemeting its behaviour are not currently converted when they could be.

          [JENKINS-34009] plugin doesn't perform conversion for subtypes of StringParameterDefinition

          One other unfortunate side effect of this bug is that any triggered build that has parameters of type TextParameterDefinition can not be "rebuilt" using the rebuild plugin. Doing so causes hard-to-debug build errors. What seems to happen is, when the job gets triggered by the parameterized build trigger, text parameters are converted to string parameters with embedded new-line characters in them, which seems to work correctly for the first execution of the build. However, if you subsequently attempt to rebuild one of those builds using the rebuild plugin, those new-line characters get stripped from the parameter value, leaving a single stream of characters ... essentially invalidating the parameter value.

          This really should be fixed. It's hard to believe this seemingly simple fix has been proposed for nearly a full year now without resolution. If there's anything that can be done to expedite the process I'd appreciate it.

          Kevin Phillips added a comment - One other unfortunate side effect of this bug is that any triggered build that has parameters of type TextParameterDefinition can not be "rebuilt" using the rebuild plugin. Doing so causes hard-to-debug build errors. What seems to happen is, when the job gets triggered by the parameterized build trigger, text parameters are converted to string parameters with embedded new-line characters in them, which seems to work correctly for the first execution of the build. However, if you subsequently attempt to rebuild one of those builds using the rebuild plugin, those new-line characters get stripped from the parameter value, leaving a single stream of characters ... essentially invalidating the parameter value. This really should be fixed. It's hard to believe this seemingly simple fix has been proposed for nearly a full year now without resolution. If there's anything that can be done to expedite the process I'd appreciate it.

            huybrechts huybrechts
            jcarrothers_sap Jim Carrothers
            Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: