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

f:optionalBlock doesn't work properly inside f:repeatable section

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Minor Minor
    • core
    • None
    • Jenkins ver. 1.632
      Jenkins-ci.plugins 1.609.3

      How to reproduce:

      1. Install (aws-sdk-plugin and) s3-plugin
      2. Open configuration for s3-plugin
      3. Create two S3 profiles with different value for "Use IAM Role"
      4. Check 'hudson.plugins.s3.S3BucketPublisher.DescriptorImpl'
        public boolean configure(StaplerRequest req, net.sf.json.JSONObject json) throws FormException {
                    Logger.getLogger("TEST").log(Level.ALL, "Json" + json.toString());
                    Logger.getLogger("TEST").log(Level.ALL, "Params" + req.getParameterMap().toString()); 
        

        Json will contain a inverted values for useRoles instances (true instead false).
        Parameters will contain a value only for first S3Profile.

      I replaced optionalBlock to checkbox and it works as expected:
      https://github.com/jenkinsci/s3-plugin/commit/a003a69961f07ba11c3494c8946cfffa62232cee

            Unassigned Unassigned
            jimilian Alexander A
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: