Conversation
| @DataBoundSetter | ||
| public void setSelectedCategory(String category) { | ||
| this.selectedCategory = category; | ||
| } |
There was a problem hiding this comment.
Adding getter resolved this. I was able to get generated script like below
onboarding name: 'sa', selectedCategory: 'b5d06f12-6446-47de-8abb-143380ed30af'
So far I didn't need to expose gettter as I was selecting the categories from dropdown
which is populated from global config's data and selectedCategory is used within the
class OnboardingTaskBuilder. I had not added getter as it was not required.
Is it always recommended to add getters even if a property is not being used (atleast currently)
outside the object's context?
There was a problem hiding this comment.
If you expect the snippet generator to work then you must have getters for all fields. (Or the fields themselves can be public.)
There was a problem hiding this comment.
Okay, thanks.
PS: In my opinion, snippet generator could generate the snippet considering only the properties which are public (either via getter or public) and ignoring the private properties. That would be less confusing (atleast to newcomers).
There was a problem hiding this comment.
Discussed with Thor and came to a conclusion tha it was failing for a case where you have data bound setter but not the getter. Private properties without public scope (getter and setter) are ignored as expected.
| ## Issues | ||
|
|
||
| ## Contributing | ||
|
|
||
| TODO review the default [CONTRIBUTING](https://github.com/jenkinsci/.github/blob/master/CONTRIBUTING.md) file and make sure it is appropriate for your plugin, if not then add your own one adapted from the base file | ||
|
|
||
| Refer to our [contribution guidelines](https://github.com/jenkinsci/.github/blob/master/CONTRIBUTING.md) |
There was a problem hiding this comment.
| ## Issues | |
| ## Contributing | |
| TODO review the default [CONTRIBUTING](https://github.com/jenkinsci/.github/blob/master/CONTRIBUTING.md) file and make sure it is appropriate for your plugin, if not then add your own one adapted from the base file | |
| Refer to our [contribution guidelines](https://github.com/jenkinsci/.github/blob/master/CONTRIBUTING.md) |
| <version>${revision}${changelist}</version> | ||
| <packaging>hpi</packaging> | ||
|
|
||
| <name>TODO Plugin</name> |
There was a problem hiding this comment.
I guess something like sandeep onboarding plugin
| @Extension | ||
| public static final class DescriptorImpl extends BuildStepDescriptor<Builder> { | ||
|
|
||
| public FormValidation doCheckName(@QueryParameter String value) |
There was a problem hiding this comment.
There are a lot of those methods, maybe it makes sense to extract them to a class
This PR contains tasks upto 7b level from https://engineering.beescloud.com/docs/engineering-cbci/latest/onboarding/practical-work-plugin