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

Variable bindings are not working in parameter groovy script

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Not A Defect
    • Icon: Blocker Blocker
    • None
    • Extended Choice Parameter Plug-In - Version346.vd87693c5a_86c
      Jenkins - 2.341

      Hello, 
      I am facing an issue with variable bindings as startvalues for JSONEditor options in Extended Choice Parameter Plugin. It is not possible to use the variable bindings when I updated from version 0.82. We changed import of library from Boon.FromJson to net.sf.json.* but it is not still works.
      Thank you in advance for any help.

       

      import net.sf.json.*
      
      def jsonEditorOptions = JSONObject.fromObject(/{
              disable_edit_json: true,
              disable_properties: true,
              no_additional_properties: true,
              disable_collapse: false,
              disable_array_add: false,
              disable_array_delete: false,
              disable_array_reorder: true,
              theme: "bootstrap3",
              iconlib:"fontawesome5",
             "schema":{
                "title": "Projects",
                "type": "array",
                "format":"tabs",
                "items": 
                 {  
                     "title":"ProjectTest",
                     "type":"object",
                     "properties":
                      {
                         "Project":
                         { "title": "Path",
                            "type": "boolean",
                            "propertyOrder" : 1
                         }
                      }
                 }
      },startval: {${bindStartValues}}}/);
      
       return jsonEditorOptions;
      

            vimil vimil
            borivoj Borivoj Kratochvil
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: