Hi All,

I need to store several named "profiles" for Jenkins job. So a user will 
choose human readable name but I need to get 3 properties for it in the 
jobs.
I've configured extended job plugin based "JSON Parameter" and realted 
groovy script to return an array of such presets:

Enter code here...import org.boon.Boon

def data_def = '''{
disable_edit_json: true,
disable_properties: true,
no_additional_properties: true,
disable_collapse: true,
disable_array_add: true,
disable_array_delete: true,
disable_array_reorder: true,
theme: "bootstrap2",
iconlib: "fontawesome4",
schema: {
"title": "URs",
"type": "array",
"format": "tabs",
"items": {
"title": "UR",
"headerTemplate": "{{self.Name}}",
"type": "object",
"properties": {
"Name": {
"type": "string",
"propertyOrder": 1
},
"ID": {
"type": "integer",
"propertyOrder": 2
},
"Definition": {
"type": "string",
"format": "xml",
"propertyOrder": 3
}
}
}
},
startval: [{
"Name": "UR1",
"ID": 1,
"Definition": 
"<Prefectures><Prefecture><Code>1</Code></Prefecture></Prefectures>"
},
{
"Name": "UR2",
"ID": 2,
"Definition": 
"<Prefectures><Prefecture><Code>2</Code></Prefecture><Prefecture><Code>3</Code></Prefecture><Prefecture><Code>5</Code></Prefecture></Prefectures>"
}]
}'''

def jsonEditorOptions = Boon.fromJson(data_def)

And it shows this structure as desired but it returns full JSON structure 
inside the job on submit. Not "selected" array member.
Does anyone know how to filter only selected part of the result?
Thanks!


-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/c9a0071c-b54f-4aa6-82ca-9ff97063b920%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to