-
Task
-
Resolution: Fixed
-
Minor
-
None
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.
- Do like this:
See:
- is related to
-
JENKINS-28046 Error: No stapler-class is specified
- Resolved
-
JENKINS-26294 WARNING: 'stapler-class' is deprecated is shown for almost every extension
- Resolved