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

Plugins should switch to '$class' from 'stapler-class' and 'kind'

      The field name used to specify class names in structured form is changed to $class from stapler-class and kind.
      Plugins using `stapler-class` or `kind` should follow that change as they may not get to work in future versions of Jenkins.

      They doesn't stop working immediately as Jenkins keeps the backward compatibility (it continues to send and receive stapler-class and kind).

      Instructions for plugins:

      • For plugins using stapler-class or kind in jelly files
        • You should use proper tags provided by Jenkins core, such as descriptorRadioList and dropdownDescriptorSelector.
        • lib/form/class-entry will be provided in the next version of Jenkins.
      • For plugins using stapler-class or kind in Java codes
        • Do like this:
          String clazzName = formData.optString("$class", null);
          if (clazzName == null) {
              // Fall back on the legacy stapler-class attribute.
              clazzName = formData.optString("stapler-class", null);
          }
          
        • Jenkins core should provide an alternate way in a future release so that plugins no longer need to access stapler-class and $class.

      See:

          [JENKINS-25403] Plugins should switch to '$class' from 'stapler-class' and 'kind'

          ikedam created issue -
          ikedam made changes -
          Component/s New: authorize-project-plugin [ 18155 ]
          Component/s New: build-timeout-plugin [ 15530 ]
          Component/s New: extensible-choice-parameter-plugin [ 17512 ]
          Component/s New: flexible-publish-plugin [ 16130 ]
          Component/s New: update-sites-manager-plugin [ 17576 ]
          Description Original: The field name used to specify class names in [structured form|https://wiki.jenkins-ci.org/display/JENKINS/Structured+Form+Submission] is changed to {{$class}} from {{stapler-class}} and {{kind}}.
          Plugins using `stapler-class` or `kind` should follow that change as they may not get to work in future versions of Jenkins.

          They doesn't stop working immediately as Jenkins keeps the backward compatibility (it continues to send and receive {{stapler-class}} and {{kind}}).

          See:
          * https://github.com/stapler/stapler/pull/39
          * https://github.com/jenkinsci/jenkins/pull/1443
          New: The field name used to specify class names in [structured form|https://wiki.jenkins-ci.org/display/JENKINS/Structured+Form+Submission] is changed to {{$class}} from {{stapler-class}} and {{kind}}.
          Plugins using `stapler-class` or `kind` should follow that change as they may not get to work in future versions of Jenkins.

          They doesn't stop working immediately as Jenkins keeps the backward compatibility (it continues to send and receive {{stapler-class}} and {{kind}}).

          Instructions for plugins:
          * For plugins using {{stapler-class}} or {{kind}} in jelly files
          ** You should use proper tags provided by Jenkins core, such as descriptorRadioList and dropdownDescriptorSelector.
          ** {{lib/form/class-entry}} will be provided in the next version of Jenkins.
          * For plugins using {{stapler-class}} or {{kind}} in Java codes
          ** Do like this:
          {code}
          String clazzName = formData.optString("$class", null);
          if (clazzName == null) {
              // Fall back on the legacy stapler-class attribute.
              clazzName = formData.optString("stapler-class", null);
          }
          {code}
          ** Jenkins core should provide an alternate way in a future release so that plugins no longer need to access {{stapler-class}} and {{$class}}.

          See:
          * https://github.com/stapler/stapler/pull/39
          * https://github.com/jenkinsci/jenkins/pull/1443
          ikedam made changes -
          Component/s Original: flexible-publish-plugin [ 16130 ]
          ikedam made changes -
          Component/s Original: build-timeout-plugin [ 15530 ]
          Component/s Original: core [ 15593 ]
          Assignee New: ikedam [ ikedam ]
          Ulli Hafner made changes -
          Link New: This issue is related to JENKINS-26294 [ JENKINS-26294 ]
          ikedam made changes -
          Environment New: Jenkins 1.610
          Issue Type Original: Task [ 3 ] New: Bug [ 1 ]
          Priority Original: Major [ 3 ] New: Critical [ 2 ]
          Ivan Stankov made changes -
          Link New: This issue is related to JENKINS-28046 [ JENKINS-28046 ]
          ikedam made changes -
          Environment Original: Jenkins 1.610
          Issue Type Original: Bug [ 1 ] New: Task [ 3 ]
          Priority Original: Critical [ 2 ] New: Minor [ 4 ]
          ikedam made changes -
          Component/s Original: extensible-choice-parameter-plugin [ 17512 ]
          ikedam made changes -
          Component/s Original: authorize-project-plugin [ 18155 ]
          ikedam made changes -
          Resolution New: Fixed [ 1 ]
          Status Original: Open [ 1 ] New: Closed [ 6 ]

            ikedam ikedam
            ikedam ikedam
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: