jenkinsci / jenkinsci/rest-list-parameter-plugin
[BUG] RestListParameterValue Not Exported To Remote Access API
- Dominant language
- Java
- Stars
- 14
- Forks
- 13
- PR merge metrics
- No merged PRs in 30d
Description
**Describe the bug**
The value for a RestListParameterValue Parameter is missing in Remote Access API ("../api/") responses. The parameter 'name' is shown but no 'value' element is present.
**To Reproduce**
Steps to reproduce the behavior:
1. Configure a project to use a RestListParameter parameter.
2. Generate a run/Build the project.
3. Check the Remote Access API response (`///api/xml` , `///api/json`, etc.)
4. Note the absence of a value in the response.
**Expected behavior**
The value of the parameter to be exposed to API requests.
**Screenshots**
Excerpt from the /api/xml response for a run of an example project; note the absence of a `value`:

**Versions (please complete the following information):**
- Jenkins: 2.361.4
- Plugin: 1.6.3
- Browser: Firefox, Chrome (any really)
**Additional context**
Given that the information _is_ saved to the `build.xml` and is shown properly on the /parameters page, this should be an oversight(?)
Guessing now...Is it possible the issue is the fact the `@Exported` annotation is [still on the value field](https://github.com/jenkinsci/rest-list-parameter-plugin/blob/rest-list-parameter-1.6.3/src/main/java/io/jenkins/plugins/restlistparam/RestListParameterValue.java#L19) rather than [the getValue method](https://github.com/jenkinsci/rest-list-parameter-plugin/blob/rest-list-parameter-1.6.3/src/main/java/io/jenkins/plugins/restlistparam/RestListParameterValue.java#L55)? As part of #85, `value` was shifted to private and the [value.jelly file was adjusted to use the getValue method](https://github.com/jenkinsci/rest-list-parameter-plugin/commit/64dac20010335302366a4400542ea0a8b07aa148#diff-effd88f6c5d40f8c45e2cbc019aec71d63dae5981c7990608628f2e5e5608941), but the annotation was not moved/changed.
Contributor guide
Research direction
Start in src/main/java/io/jenkins/plugins/restlistparam/RestListParameterValue.java, comparing the @Exported annotation on value with the getValue method and the related value.jelly change. Reproduce the Remote Access API response for a RestListParameterValue and confirm that the response exposes the parameter value as expected.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- api
- Issue type
- Bug
- Difficulty
- 1/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 45/100