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

DynamicReferenceParameter ET_TEXT_BOX extra quotes

      Hi,

      When I try to do a simple input text that return a built value from other field it give me extra quotes, not sure if I'm doing something wrong or not

         [
           $class: 'DynamicReferenceParameter',
           choiceType: 'ET_TEXT_BOX',
           name: 'DBInstance',
           referencedParameters: 'Platform,Environment',
           script: [
              $class: 'GroovyScript',
              fallbackScript: [
                classpath: [],
                sandbox: true,
                script: "return ''",
              ],
              script: [
                sandbox: true,
                script: """
                return Platform + "-" + Environment + "-master"
                """.stripIndent()                              
              ]                                                
           ]                                                    

      It give me

      And when I submit the form value from these fields are empty (AwsRegion & DBInstance)


      Regards

          [JENKINS-74791] DynamicReferenceParameter ET_TEXT_BOX extra quotes

          Benjamin created issue -
          Benjamin made changes -
          Attachment Original: image-2024-10-31-09-17-01-300.png [ 63482 ]
          Benjamin made changes -
          Attachment New: image-2024-10-31-09-28-01-104.png [ 63483 ]
          Benjamin made changes -
          Description Original: Hi,

          When I try to do a simple input text that return a built value from other field it give me extra quotes, not sure if I'm doing something wrong or not
          {code:java}
             [
               $class: 'DynamicReferenceParameter',
               choiceType: 'ET_TEXT_BOX',
               name: 'DBInstance',
               referencedParameters: 'Platform,Environment',
               script: [
                  $class: 'GroovyScript',
                  fallbackScript: [
                    classpath: [],
                    sandbox: true,
                    script: "return ''",
                  ],
                  script: [
                    sandbox: true,
                    script: """
                    return Platform + "-" + Environment + "-master"
                    """.stripIndent()                              
                  ]                                                
               ]                                                    {code}

          It give me

          !image-2024-10-31-09-17-26-727.png!

          Regards
          New: Hi,

          When I try to do a simple input text that return a built value from other field it give me extra quotes, not sure if I'm doing something wrong or not
          {code:java}
             [
               $class: 'DynamicReferenceParameter',
               choiceType: 'ET_TEXT_BOX',
               name: 'DBInstance',
               referencedParameters: 'Platform,Environment',
               script: [
                  $class: 'GroovyScript',
                  fallbackScript: [
                    classpath: [],
                    sandbox: true,
                    script: "return ''",
                  ],
                  script: [
                    sandbox: true,
                    script: """
                    return Platform + "-" + Environment + "-master"
                    """.stripIndent()                              
                  ]                                                
               ]                                                    {code}
          It give me

          !image-2024-10-31-09-17-26-727.png!

          And when I submit the form value from these fields are empty (AwsRegion & DBInstance)

          !image-2024-10-31-09-28-01-104.png!
          Regards

          Benjamin added a comment -

          fyi I switched to ET_FORMATTED_HTML and no issue with it

          Benjamin added a comment - fyi I switched to ET_FORMATTED_HTML and no issue with it

          benj thanks a lot for the detailed issue report. I think I should be able to reproduce it with the info you provided, but it would be a bit faster if you could make a small example project to reproduce, and share the config.xml (I normally have a short time window over weekends to work on Active Choices or TAP Jenkins plugins, and having that config.xml saves a lot of time). If not, that's fine too. Your issue description is really good. Cheers.

          Bruno P. Kinoshita added a comment - benj thanks a lot for the detailed issue report. I think I should be able to reproduce it with the info you provided, but it would be a bit faster if you could make a small example project to reproduce, and share the config.xml (I normally have a short time window over weekends to work on Active Choices or TAP Jenkins plugins, and having that config.xml saves a lot of time). If not, that's fine too. Your issue description is really good. Cheers.

            kinow Bruno P. Kinoshita
            benj Benjamin
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: