Skip to content

JSON editor parameter can be edited during rebuild even if disable_edit_json is set to true #63

Description

@edek437

Jenkins and plugins versions report

Environment
I have Jenkins 2.516.3 with java17 on Debian 12 with plugins

ansicolor:1.0.6
antisamy-markup-formatter:173.v680e3a_b_69ff3
apache-httpcomponents-client-4-api:4.5.14-269.vfa_2321039a_83
asm-api:9.9-185.va_6c6b_3348b_c3
badge:2.11
bootstrap5-api:5.3.8-895.v4d0d8e47fea_d
bouncycastle-api:2.30.1.82-277.v70ca_0b_877184
branch-api:2.1255.v2f5fe203584a_
build-timeout:1.38
build-token-root:151.va_e52fe3215fc
caffeine-api:3.2.2-178.v353b_8428ed56
checks-api:373.vfe7645102093
cloud-stats:377.vd8a_6c953e98e
cloudbees-disk-usage-simple:256.v20ec4eb_884f1
cloudbees-folder:6.1053.vd62fb_b_f7367b_
command-launcher:123.v37cfdc92ef67
commons-lang3-api:3.19.0-104.v12125f33a_255
commons-text-api:1.14.0-194.v804a_dc3a_1b_d8
conditional-buildstep:1.5.0
config-file-provider:1002.v93e06b_792d44
configuration-as-code:1998.v3e50e6e9d9d3
copyartifact:770.va_6c69e063442
credentials:1447.v4cb_b_539b_5321
credentials-binding:702.vfe613e537e88
CustomHistory:1.6
dark-theme:574.va_19f05d54df5
dashboard-view:2.543.vca_9da_3cb_9c60
description-setter:264.v1957f215dcd5
display-url-api:2.217.va_6b_de84cc74b_
downstream-ext:73.vdda_16e6eb_0da
durable-task:605.v9a_b_9040c9970
echarts-api:6.0.0-1165.vd1283a_3e37d4
eddsa-api:0.3.0.1-19.vc432d923e5ee
email-ext:1933.v45cec755423f
emoji-symbols-api:17.0-57.v8d44b_9a_b_d5ea_
extended-choice-parameter:388.ve7b_d0b_920e10
external-monitor-job:223.vb_fddcf42c9b_3
file-leak-detector:1.14
font-awesome-api:7.1.0-882.v1dfb_771e3278
generic-webhook-trigger:2.4.1
gerrit-trigger:2.42.0
git:5.8.0
git-client:6.4.0
git-server:137.ve0060b_432302
groovy:497.v7b_061a_a_de65d
groovy-label-assignment:1.2.0
groovy-postbuild:272.v52a_03efb_8653
gson-api:2.13.2-173.va_a_092315913c
hashicorp-vault-plugin:371.v884a_4dd60fb_6
htmlpublisher:427
instance-identity:203.v15e81a_1b_7a_38
ionicons-api:94.vcc3065403257
jackson2-api:2.20.0-420.v8a_08b_d57ca_05
jakarta-activation-api:2.1.3-2
jakarta-mail-api:2.1.3-3
jakarta-xml-bind-api:4.0.5-3.v3d5b_a_73965b_9
javax-activation-api:1.2.0-8
javax-mail-api:1.6.2-11
jaxb:2.3.9-133.vb_ec76a_73f706
jdk-tool:83.v417146707a_3d
job-dsl:1.93
jobConfigHistory:1356.ve360da_6c523a_
jquery3-api:3.7.1-619.vdb_10e002501a_
jsch:0.2.16-95.v3eecb_55fa_b_78
json-api:20250517-173.v596efb_962a_31
json-editor-parameter:54.v71962f37a_416
json-path-api:2.9.0-190.veefca_05d5477
jsoup:1.21.2-66.v6ea_38164b_8a_2
junit:1363.v2ea_b_461a_1480
ldap:793.v754d6b_41b_ea_4
ldapemail:0.8
locale:597.v7781ce70d4cf
mailer:522.va_995fa_cfb_8b_d
matrix-auth:3.2.8
matrix-project:870.v9db_fcfc2f45b_
metrics:4.2.37-487.v7d6048d8733c
mina-sshd-api-common:2.16.0-167.va_269f38cc024
mina-sshd-api-core:2.16.0-167.va_269f38cc024
monitoring:2.5.0
nested-view:241.v178f0b_a_cd76a_
nodelabelparameter:759.vb_b_e95db_f3251
oic-auth:4.609.v9de140f63d01
okhttp-api:4.12.0-195.vc02552c04ffd
openstack-cloud:1465.vd3b_a_103e31fd
parameterized-trigger:873.v8b_e37dd8418f
pipeline-graph-analysis:245.v88f03631a_b_21
pipeline-input-step:534.v352f0a_e98918
pipeline-rest-api:2.38
pipeline-stage-step:322.vecffa_99f371c
plain-credentials:199.v9f8e1f741799
plugin-util-api:6.1192.v30fe6e2837ff
popper2-api:2.11.6-5
postbuild-task:78.v24529f1f5cdb_
prism-api:1.30.0-630.va_e19d17f83b_0
prometheus:819.v50953a_c560dd
promoted-builds:992.va_00888f21b_74
rebuild:338.va_0a_b_50e29397
resource-disposer:0.25
role-strategy:799.v5b_e7b_ecc231e
run-condition:243.v3c3f94e46a_8b_
scm-api:712.v8846fdd68c88
scoring-load-balancer:202.ve8d1e11694e2
script-security:1378.vf25626395f49
sectioned-view:1.30
sidebar-link:2.4.2
simple-theme-plugin:211.v5424a_5510e47
slave-status:56.v1798df8ff586
snakeyaml-api:2.3-125.v4d77857a_b_402
ssh:158.ve2a_e90fb_7319
ssh-credentials:361.vb_f6760818e8c
ssh-slaves:3.1071.v0d059c7b_c555
sshd:3.374.v19b_d59ce6610
statistics-gatherer:2.0.3
structs:353.v261ea_40a_80fb_
theme-manager:319.v9193461f9671
throttle-concurrents:2.18
timestamper:1.30
token-macro:477.vd4f0dc3cb_cf1
trilead-api:2.209.v0e69b_c43c245
variant:70.va_d9f17f859e0
view-job-filters:405.v9a_5fddc9230d
workflow-api:1384.vdc05a_48f535f
workflow-cps:4209.v83c4e257f1e9
workflow-durable-task-step:1464.v2d3f5c68f84c
workflow-job:1551.v7320b_88b_d5e6
workflow-scm-step:452.vdf1ca_c8d3a_87
workflow-step-api:710.v3e456cc85233
workflow-support:991.v66c18437d509
ws-cleanup:0.49

What Operating System are you using (both controller, and any agents involved in the problem)?

Debian 12 (container image used: docker-registry-remote.artifactory-espoo1.int.net.nokia.com/jenkins/jenkins:2.516.3-lts-jdk17)

Reproduction steps

Using JEP (json-editor-parameter) with below schema and options

Schema

{"type":"object","title":"Pick SW Load to patch","properties":{"swLoadType":{"oneOf":[{"type":"object","title":"SBTS","properties":{"name":{"type":"string","default":"SBTS","options":{"hidden":true}},"FSMF":{"title":"FSMF","type":"boolean","format":"checkbox","default":true},"ASIA":{"title":"ASIA","type":"boolean","format":"checkbox","default":true},"ASIB":{"title":"ASIB","type":"boolean","format":"checkbox","default":true},"ASIK":{"title":"ASIK","type":"boolean","format":"checkbox","default":true},"ASIL":{"title":"ASIL","type":"boolean","format":"checkbox","default":true},"ASIM":{"title":"ASIM","type":"boolean","format":"checkbox","default":true},"ASOE":{"title":"ASOE","type":"boolean","format":"checkbox","default":true},"ASOG":{"title":"ASOG","type":"boolean","format":"checkbox","default":true}}},{"type":"object","title":"vDU","properties":{"name":{"type":"string","default":"vDU","options":{"hidden":true}},"vDU":{"title":"vDU","type":"boolean","format":"checkbox","default":true}}},{"type":"object","title":"vDU4G","properties":{"name":{"type":"string","default":"vDU4G","options":{"hidden":true}},"vDU4G":{"title":"vDU4G","type":"boolean","format":"checkbox","default":true}}},{"type":"object","title":"CU_CNF","properties":{"name":{"type":"string","default":"CU_CNF","options":{"hidden":true}},"CU_CNF":{"title":"CU_CNF","type":"boolean","format":"checkbox","default":true}}}]}}}

Options

{
"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,"keep_oneof_values":false,"iconlib":"foundation-icons"
}

Expected Results

JEP is not editable when clicking rebuild.

Actual Results

After clicking rebuild JEP allows me to edit JSON however I like but it shouldn't be editable when disable_edit_json = true

You can notice below that I successfully added xD string option to existing schema.

Image

Anything else?

No response

Are you interested in contributing a fix?

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Fields

    No fields configured for Bug.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions