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

Active-Choice jenkinsProject variable is not available under Folder

      As a freestyle job at top level (not under any folder),
      the groovy script below is working
      for both "Active Choice Parameter" and "Active Choices Reactive Parameter":

      return [ jenkinsProject.getName() ]
      

      But when I move this same freestyle job under a "Cloudbees Folder",
      or when I use the same script in "Multibranch-MultiConfiguration" job
      then it will run the "Fallback script".

          [JENKINS-36590] Active-Choice jenkinsProject variable is not available under Folder

          Rick Liu created issue -
          Rick Liu made changes -
          Summary Original: Active-Choice jenkinsProject variable is not available under Folder or Multibranch-Multiconfiguration New: Active-Choice jenkinsProject variable is not available under Folder or Multibranch-Multiconfiguration job
          Rick Liu made changes -
          Description Original: As a freestyle job at top level (not under any folder),
          the groovy script below is working
          for both "*Active Choice Parameter*" and "*Active Choices Reactive Parameter*":
          {code}
          return[ jenkinsProject.getName() ]
          {code}

          But when I move this same freestyle job under a "*Cloudbees Folder*",
          or when I use the same script in "*Multibranch-MultiConfiguration*" job
          then it will run the "*Fallback script*".
          New: As a freestyle job at top level (not under any folder),
          the groovy script below is working
          for both "*Active Choice Parameter*" and "*Active Choices Reactive Parameter*":
          {code}
          return [ jenkinsProject.getName() ]
          {code}

          But when I move this same freestyle job under a "*Cloudbees Folder*",
          or when I use the same script in "*Multibranch-MultiConfiguration*" job
          then it will run the "*Fallback script*".

          Rick Liu added a comment -

          While testing for this bug,
          I found JENKINS-32461 bug still exists:
          jenkinsProject variable is not available in Multi-configuration project (at top level outside folder)

          Rick Liu added a comment - While testing for this bug, I found JENKINS-32461 bug still exists: jenkinsProject variable is not available in Multi-configuration project (at top level outside folder)

          Thanks for testing it and replying here totoroliu. Will try to reproduce this issue and check how hard it would be to implement this feature.

          Bruno P. Kinoshita added a comment - Thanks for testing it and replying here totoroliu . Will try to reproduce this issue and check how hard it would be to implement this feature.
          Bruno P. Kinoshita made changes -
          Link New: This issue is related to JENKINS-33538 [ JENKINS-33538 ]
          Bruno P. Kinoshita made changes -
          Status Original: Open [ 1 ] New: In Progress [ 3 ]

          Issue reproduced locally. Debugger attached, let's see what's going on.

          Bruno P. Kinoshita added a comment - Issue reproduced locally. Debugger attached, let's see what's going on.
          Bruno P. Kinoshita made changes -
          Status Original: In Progress [ 3 ] New: Open [ 1 ]
          Bruno P. Kinoshita made changes -
          Attachment New: Screenshot from 2016-07-25 16-25-58.png [ 33423 ]

            kinow Bruno P. Kinoshita
            totoroliu Rick Liu
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: