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

introduce a label to display on the page instead of the parameter name

    • Icon: New Feature New Feature
    • Resolution: Unresolved
    • Icon: Minor Minor
    • active-choices-plugin
    • None

      Hello,

      I would like to have a parameter label visualized in the parameter form in place of parameter name.

      [
        $class: 'ChoiceParameter',
        choiceType: 'PT_SINGLE_SELECT',
        name: 'NEXUS_REPO_ID',
        label: 'Nexus repository type',          <---- used in jelly template
         script: [
          $class: 'GroovyScript',
          script: [
            sandbox: true, 
            script: """
              return ['release', 'snapshot']
            """.stripIndent()
          ]
        ]
      ]

       

          [JENKINS-72403] introduce a label to display on the page instead of the parameter name

          Thank you for creating the issue luigirizzo . Sounds like a good feature, not sure how complicated it would be to implement... or if maybe that's already possible through JavaScript and the reference dynamic parameter... do you think it'd be doable right now ioannis ? If it's not possible right now I will at the code changes required.

          Bruno P. Kinoshita added a comment - Thank you for creating the issue luigirizzo . Sounds like a good feature, not sure how complicated it would be to implement... or if maybe that's already possible through JavaScript and the reference dynamic parameter... do you think it'd be doable right now ioannis ? If it's not possible right now I will at the code changes required.

          luigirizzo having such a feature seems confusing to me. The configuration parameter names are used in the pipeline as variables, but now they would no longer match the labels displayed in the UI. It might be simpler to just include the desired label as part of the parameter description.

          kinow Using an Active Choice reference parameter, would still not solve the issue as these parameters still need a name which ends-up displayed on the build form UI. You can use an anonymous AC parameter (no name at all), but then there is no easy way to pass its value to the build, unless you use JavaScript to read this value into another parameter of the build.

          Ioannis Moutsatsos added a comment - luigirizzo having such a feature seems confusing to me. The configuration parameter names are used in the pipeline as variables, but now they would no longer match the labels displayed in the UI. It might be simpler to just include the desired label as part of the parameter description . kinow Using an Active Choice reference parameter, would still not solve the issue as these parameters still need a name which ends-up displayed on the build form UI. You can use an anonymous AC parameter (no name at all), but then there is no easy way to pass its value to the build, unless you use JavaScript to read this value into another parameter of the build.

            kinow Bruno P. Kinoshita
            luigirizzo Luigi
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated: