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

Please add the ability to multi-select #23

Open
imoutsatsos opened this issue Mar 7, 2014 · 6 comments
Open

Please add the ability to multi-select #23

imoutsatsos opened this issue Mar 7, 2014 · 6 comments

Comments

@imoutsatsos
Copy link

The ability to multi-select parameters is critical for most non-trivial applications of a choice list. In my work I use Jenkins to submit statistical R scripts for execution and I need to be able to submit more than one choices to correctly parameterize the R script. THANK YOU this a great plugin and I'm closely following its evolution.

@kinow
Copy link

kinow commented Mar 15, 2014

Hi @imoutsatsos!

I think this is already implemented (though I'm not sure if it's released). I added a dynamic choice parameter, which the choice type is multiselect. Then setting the script to something like java.util.Arrays.asList('A', 'B', 'C') brings me a multiselect combobox.

Using CTRL and picking more than 1 row seems to work fine.

@imoutsatsos
Copy link
Author

Hi @kinow thanks for taking a look at this. You are correct in that the mutli-select option has not been released and can only be found in several of the pull requests for this plugin. I have spend many hours (days?) trying to get any of the snapshots to work with my Jenkins LTS v1.532.1 wihout success. When using any snapshot (other than #12 which partially implemented the cascading parameter option) I always get the following error (see screenshot below)
dyparam_nopage

Using you script example the stack trace goes something like this

Stack trace

javax.servlet.ServletException: org.apache.commons.jelly.JellyTagException: jar:file:/D:/DEVTOOLS/Jenkins/plugins/dynamicparameter/WEB-INF/lib/classes.jar!/com/seitenbau/jenkins/plugins/dynamicparameter/ChoiceParameterDefinition/index.jelly:40:64: <st:include> No page found '../commons/selectContent.jelly' for class com.seitenbau.jenkins.plugins.dynamicparameter.ChoiceParameterDefinition
    at org.kohsuke.stapler.jelly.JellyRequestDispatcher.forward(JellyRequestDispatcher.java:60)
    at hudson.model.AbstractProject.doBuild(AbstractProject.java:1828)
    at hudson.model.AbstractProject.doBuild(AbstractProject.java:1852)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    at java.lang.reflect.Method.invoke(Unknown Source)
    at org.kohsuke.stapler.Function$InstanceFunction.invoke(Function.java:297)
    at org.kohsuke.stapler.Function.bindAndInvoke(Function.java:160)
    at org.kohsuke.stapler.Function.bindAndInvokeAndServeResponse(Function.java:95)
    at org.kohsuke.stapler.MetaClass$1.doDispatch(MetaClass.java:111)
    at org.kohsuke.stapler.NameBasedDispatcher.dispatch(NameBasedDispatcher.java:53)
    at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:685)
    at org.kohsuke.stapler.Stapler.invoke(Stapler.java:799)
    at org.kohsuke.stapler.MetaClass$6.doDispatch(MetaClass.java:239)
    at org.kohsuke.stapler.NameBasedDispatcher.dispatch(NameBasedDispatcher.java:53)
    at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:685)

@kinow
Copy link

kinow commented Mar 17, 2014

Weird, let me check with 1.532.2. I used the version from the master branch, running with mvn clean hpi:run.

@kinow
Copy link

kinow commented Mar 17, 2014

Issue confirmed! I'll investigate what's the root cause Ioannis :) nice catch, didn't occur when I used the 1.477 version

@kinow
Copy link

kinow commented Mar 18, 2014

Hi again @imoutsatsos. I tried updating the source code to 1.532.2 and 1.555 without success. Some tests simply fail. Thus I'm not able to create an HPI file to debug it in the LTS version. Seems like a good opportunity to fork it to uno-choice. WDYT?

@imoutsatsos
Copy link
Author

uno-choice it is! It's too bad that some of these promising plugins fall by the wayside. Hopefully some of the existing code will still be instructive...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants