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

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

    XMLWordPrintable

    Details

    • Similar Issues:

      Description

      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:

        Attachments

          Issue Links

            Activity

            Hide
            scm_issue_link SCM/JIRA link daemon added a comment -

            Code changed in jenkins
            User: ikedam
            Path:
            src/main/java/org/jenkinsci/plugins/authorizeproject/AuthorizeProjectProperty.java
            http://jenkins-ci.org/commit/authorize-project-plugin/440d75a4ea5e3d070751c0ea45010c66c4ee0893
            Log:
            Merge pull request #7 from mattmoor/master

            JENKINS-25403 Add support for upcoming $class annotation change

            Compare: https://github.com/jenkinsci/authorize-project-plugin/compare/a2eee2fb9741...440d75a4ea5e

            Show
            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: ikedam Path: src/main/java/org/jenkinsci/plugins/authorizeproject/AuthorizeProjectProperty.java http://jenkins-ci.org/commit/authorize-project-plugin/440d75a4ea5e3d070751c0ea45010c66c4ee0893 Log: Merge pull request #7 from mattmoor/master JENKINS-25403 Add support for upcoming $class annotation change Compare: https://github.com/jenkinsci/authorize-project-plugin/compare/a2eee2fb9741...440d75a4ea5e
            Hide
            scm_issue_link SCM/JIRA link daemon added a comment -

            Code changed in jenkins
            User: ikedam
            Path:
            src/main/java/jp/ikedam/jenkins/plugins/extensible_choice_parameter/ExtensibleChoiceParameterDefinition.java
            src/main/resources/jp/ikedam/jenkins/plugins/extensible_choice_parameter/ExtensibleChoiceParameterDefinition/config.jelly
            http://jenkins-ci.org/commit/extensible-choice-parameter-plugin/4273077469844aa67b65f9febca8e4781a6f0f9f
            Log:
            [FIXED JENKINS-28046]JENKINS-25403 Now uses f:dropdownDescriptorSelector, which is provided by Jenkins core. This avoids problem with Jenkins-1.610. / Now handles also $class not only stapler-class.

            Show
            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: ikedam Path: src/main/java/jp/ikedam/jenkins/plugins/extensible_choice_parameter/ExtensibleChoiceParameterDefinition.java src/main/resources/jp/ikedam/jenkins/plugins/extensible_choice_parameter/ExtensibleChoiceParameterDefinition/config.jelly http://jenkins-ci.org/commit/extensible-choice-parameter-plugin/4273077469844aa67b65f9febca8e4781a6f0f9f Log: [FIXED JENKINS-28046] JENKINS-25403 Now uses f:dropdownDescriptorSelector, which is provided by Jenkins core. This avoids problem with Jenkins-1.610. / Now handles also $class not only stapler-class.
            Hide
            ikedam ikedam added a comment -

            extensible-choice-parameter is fixed with 1.3.0.

            Show
            ikedam ikedam added a comment - extensible-choice-parameter is fixed with 1.3.0.
            Hide
            ikedam ikedam added a comment -

            fixed authorize-project-plugin with 1.1.0.

            Show
            ikedam ikedam added a comment - fixed authorize-project-plugin with 1.1.0.
            Hide
            ikedam ikedam added a comment -

            updates-sites-manager was refactored and no longer depends on `stapler-class` or `kind` anymore in update-sites-manager-2.0.0.

            Show
            ikedam ikedam added a comment - updates-sites-manager was refactored and no longer depends on `stapler-class` or `kind` anymore in update-sites-manager-2.0.0.

              People

              • Assignee:
                ikedam ikedam
                Reporter:
                ikedam ikedam
              • Votes:
                0 Vote for this issue
                Watchers:
                5 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: