• Icon: Improvement Improvement
    • Resolution: Fixed
    • Icon: Minor Minor
    • workflow-cps-plugin
    • None

      Consider the following workflow script:

      echo "bool=$bool"
      echo bool.getClass().toString()

      Output:

      Started by user Jos Backus
      Running: Print Message
      bool=false
      Running: Print Message
      class java.lang.String
      Running: End of Workflow
      Finished: SUCCESS

      I would expect the name of the class to be java.lang.Boolean, not java.lang.String. This forces one to add lines such as:

      bool = bool == 'true'

          [JENKINS-27295] Boolean parameters injected as String

          Jos Backus created issue -
          Jesse Glick made changes -
          Link New: This issue is duplicated by JENKINS-27388 [ JENKINS-27388 ]
          Jesse Glick made changes -
          Issue Type Original: Bug [ 1 ] New: Improvement [ 4 ]
          Summary Original: Boolean parameters injected as Strings into Groovy Workflow Plugin environment New: Boolean parameters injected as String
          Jesse Glick made changes -
          Link New: This issue is blocking JENKINS-27413 [ JENKINS-27413 ]
          Jesse Glick made changes -
          Link New: This issue is related to JENKINS-29952 [ JENKINS-29952 ]
          Jesse Glick made changes -
          Link New: This issue is related to SECURITY-170 [ SECURITY-170 ]
          Jesse Glick made changes -
          Link New: This issue is related to JENKINS-30222 [ JENKINS-30222 ]
          Jesse Glick made changes -
          Link New: This issue is related to JENKINS-30519 [ JENKINS-30519 ]
          Jesse Glick made changes -
          Link Original: This issue is related to JENKINS-30222 [ JENKINS-30222 ]
          Jesse Glick made changes -
          Link New: This issue is related to JENKINS-34101 [ JENKINS-34101 ]
          Jesse Glick made changes -
          Epic Link New: JENKINS-35394 [ 171187 ]

            jglick Jesse Glick
            josb Jos Backus
            Votes:
            1 Vote for this issue
            Watchers:
            15 Start watching this issue

              Created:
              Updated:
              Resolved: