Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Jenkins dynamically put checkbox

Let's say I have a dropdown list parameter with a few selections and I want one of the selections to bring checkboxes, otherwise they will not be shown.

How can I do that? I tried Extended Parameter but no help, please help me.

First selection will call another multi-choice selections (checkboxes),

But only one selection will do that, others will not bring another selection.

like image 858
Rasim AVCI Avatar asked Jun 17 '26 01:06

Rasim AVCI


1 Answers

According to Ross Tracy's answer:

  • Add an Active Choices Parameter with:

    Name: Active_Choices_Parameter

    Groovy Script:

    return [
      '',
      'First',
      'Second',
      'Third'
    ]
    

    Choice Type: Single Select

  • Add an Active Choices Reactive Parameter with:

    Name: Active_Choices_Reactive_Parameter

    Groovy Script:

    if ( Active_Choices_Parameter.equals('') )
      return ''
    else if ( Active_Choices_Parameter.equals('First') )
      return [
        '1. Fourth',
        '1. Fifth',
        '1. Sixth'
      ]
    

    Choice Type: Check Boxes

    Referenced parameters: Active_Choices_Parameter

like image 163
Gerold Broser Avatar answered Jun 20 '26 23:06

Gerold Broser



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!