Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FEATURE] Multiple choice #19

Open
jamesnswithers opened this issue Oct 17, 2020 · 4 comments
Open

[FEATURE] Multiple choice #19

jamesnswithers opened this issue Oct 17, 2020 · 4 comments
Labels
enhancement New feature or request help wanted Extra attention is needed

Comments

@jamesnswithers
Copy link

Is your feature request related to a problem? Please describe.
Be able to select multiple choices

Describe the solution you'd like
An checkbox option in the configuration to set the select input as singular or multiple choice

Describe alternatives you've considered
Multiple input parameters all pointing to the same webservice but very impractical

Additional context
None

@jamesnswithers jamesnswithers added the enhancement New feature or request label Oct 17, 2020
@h1dden-da3m0n
Copy link
Contributor

Hi James!

First of all, thank you for the feature request!
I currently cant say for sure if Jenkins offers the right Form control to accomplish this, but I'll have a look once I have the time. (currently a bit time limited)
More importantly though I fear that the way how Jenkins handles build parameter values could turn out as a major blocker for this one unfortunately. (Just a heads up, unless you happen to know of a multi select parameter plugin besides the uni-choise plugin)

With all that said, I'll investigate how and if this could be realized as soon as I have the time.

NOTE:
If you or any passing by developer wants to work on this, please feel welcome to do so!
Just leave a note that you are working on it in that case.

@ianwilliams1
Copy link

ianwilliams1 commented Oct 19, 2020

This very much seems to tied into how the parameter is used later on, which would complicate any implementation. We have a scenario using a string build parameter where we can enter multiple values, but then we have a groovy step that iterates over them (which then calls a another job with the the specific build parameter). That would not work in other multiple choice scenarios.

The Extended Choice Parameter does support multi-select, but the Extensible Choice Parameter does not. That may be a reference point to leverage (disclaimer: I've only used extended).

ps: OP's requested behavior also seems to be similar to how JIRA search selector options works, so may be an overall Jenkins implementation limitation.

@h1dden-da3m0n
Copy link
Contributor

I thought about this a bit, the only way a multi select would be usable is if you have a script within your pipeline to iterate over the selected values and act according to what values are in that list then.
I am not saying that it is impossible, but since the Jenkins UI does not provide such a control natively (at least as far as I can tell) I have to admin that this might be out of my reach ☹️

/reason: I am no front-end developer, I don't really like JavaScript and I am pretty lost without a framework like Angular or Vue in the Web world (PHP would also be a possibility).
The Extended Choice Parameter seems to provide the here requested functionality via JavaScript if I interpreted that right, same goes for the Active Choice plugin which can also offer a multi select parameter.

Finally, I will keep this open and see what I can do to maybe still realize the functionality on my own, but in the mean time give I will add the help wanted label. Thank you for your understanding!

@h1dden-da3m0n h1dden-da3m0n added the help wanted Extra attention is needed label Oct 19, 2020
@jamesnswithers
Copy link
Author

Thanks both, i've used both Extended Choice Parameter and Active Choice plugin and whilst they can be tailored quite extensively they can be overly complicated especially for something as 'simple' as a multiple select.

I had a tinker on the weekend with this feature request and got something working in a similar fashion to both previously mentioned plugins where a string is passed through as a csv but i'm not sure how happy I am with it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

3 participants