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

Extended Choice Parameter ignores first property value

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Minor Minor
    • None
    • OS: Ubuntu 14.04.5 LTS
      Jenkins: 2.7.4
      ECP Plugin: 0.75
      Web Browser: Google Chrome 54.0.2840.71

      Using the Extended Choice Plugin with a property file, it appears to be stripping out the first value

      Project config

      • Basic Parameter Types:
        • Parameter Type: Single Select
      • Choose Source for Value:
        • Property File = /tmp/branches-testing
        • Property Key = branches
      • Choose Source for Default Value:
        • Default Value = master
      • Choose Source for Value Description:
        • Description = Branch to build
      test1$ echo -n "branches=master,branchA,branchB," > /tmp/branches-testing
      

      test2$ echo -n "branches=branchC,master,branchA,branchB," > /tmp/branches-testing
      

        1. test2.png
          test2.png
          16 kB
        2. test1.png
          test1.png
          17 kB

          [JENKINS-39358] Extended Choice Parameter ignores first property value

          Kevin Bonner created issue -
          Kevin Bonner made changes -
          Description Original: Using the Extended Choice Plugin with a property file, it appears to be stripping out the first value

          Project config
          * Basic Parameter Types:
          ** Parameter Type: Single Select
          * Choose Source for Value:
          ** Property File = /tmp/branches-testing
          ** Property Key = branches
          * Choose Source for Default Value:
          ** Default Value = master

          We use the /var/lib/jenkins/build-branches.sh tool to populate the property files, but for testing I just went with simple echo commands.
          {code:none}
          test1$ echo -n "branches=master,branchA,branchB," > /tmp/branches-testing
          {code}
           !test1.png|thumbnail!

          {code:none}
          test2$ echo -n "branches=branchC,master,branchA,branchB," > /tmp/branches-testing
          {code}
           !test2.png|thumbnail!
          New: Using the Extended Choice Plugin with a property file, it appears to be stripping out the first value

          Project config
          * Basic Parameter Types:
          ** Parameter Type: Single Select
          * Choose Source for Value:
          ** Property File = /tmp/branches-testing
          ** Property Key = branches
          * Choose Source for Default Value:
          ** Default Value = master
          * Choose Source for Value Description:
          ** Description = Branch to build

          We use the /var/lib/jenkins/build-branches.sh tool to populate the property files, but for testing I just went with simple echo commands.
          {code:none}
          test1$ echo -n "branches=master,branchA,branchB," > /tmp/branches-testing
          {code}
           !test1.png|thumbnail!

          {code:none}
          test2$ echo -n "branches=branchC,master,branchA,branchB," > /tmp/branches-testing
          {code}
           !test2.png|thumbnail!
          Kevin Bonner made changes -
          Description Original: Using the Extended Choice Plugin with a property file, it appears to be stripping out the first value

          Project config
          * Basic Parameter Types:
          ** Parameter Type: Single Select
          * Choose Source for Value:
          ** Property File = /tmp/branches-testing
          ** Property Key = branches
          * Choose Source for Default Value:
          ** Default Value = master
          * Choose Source for Value Description:
          ** Description = Branch to build

          We use the /var/lib/jenkins/build-branches.sh tool to populate the property files, but for testing I just went with simple echo commands.
          {code:none}
          test1$ echo -n "branches=master,branchA,branchB," > /tmp/branches-testing
          {code}
           !test1.png|thumbnail!

          {code:none}
          test2$ echo -n "branches=branchC,master,branchA,branchB," > /tmp/branches-testing
          {code}
           !test2.png|thumbnail!
          New: Using the Extended Choice Plugin with a property file, it appears to be stripping out the first value

          Project config
          * Basic Parameter Types:
          ** Parameter Type: Single Select
          * Choose Source for Value:
          ** Property File = /tmp/branches-testing
          ** Property Key = branches
          * Choose Source for Default Value:
          ** Default Value = master
          * Choose Source for Value Description:
          ** Description = Branch to build


          {code:none}
          test1$ echo -n "branches=master,branchA,branchB," > /tmp/branches-testing
          {code}
           !test1.png|thumbnail!

          {code:none}
          test2$ echo -n "branches=branchC,master,branchA,branchB," > /tmp/branches-testing
          {code}
           !test2.png|thumbnail!

          Kevin Bonner added a comment -

          When Choose Source for Value Description is blank, the first property value is not skipped

          Kevin Bonner added a comment - When Choose Source for Value Description is blank, the first property value is not skipped

            vimil vimil
            kbonner Kevin Bonner
            Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: