[WiP] - Store values from multi-level multi select list#9
Conversation
|
It's hard to review changes due to the multiple formatting changes. |
|
Thank you for a pull request! Please check this document for how the Jenkins project handles pull requests |
|
This commit shows the changes from the original without all the formatted lines |
|
I'm not skilled enough in JavaScript to review the code, but the entire Java part should be reworked |
|
Thanks for the clear feedback. Based off your review, I made the necessary changes. The initial extension I did was a quick fix so we could use it right away and I noticed other people also inquiring about how to store all values from the multi-level select list. One thing I was unable to get working was the logger (java.util.logger.Logger), it doesn't seem to be displaying in the console as System IO was. Since it's only for debugging purposes, I have another commit without the debugging lines. I've been using this modified plugin for several months and it's been working well so far with the various plugins on our Jenkins instance. |
I would recommend to merge you commits into a single one in order to review the code again. |
|
I created a new branch from master before the changes I did (91339d6). I edited the files and I was going to use squash or rebase to merge commits into one, doing something like Should I open a new pull request? I don't have Unit Tests written yet, I'm still getting acquainted with JUnit and HTMLUnit. However, I tried various scenarios with the plugin on my local Jenkins and found an issue with the way the values were being stored, which I've fixed. The addition I made is fairly simple, so I don't think it should break anything else, but I have another branch where I'll work on Unit Tests for this. |
|
@lkisac
Force push should resolve any issue |
|
It says everything is up-to-date. This is my latest commit b7a5a76, but it's not showing here for me to click the 'Reopen and comment' button. |
|
I read that it's not possible to re-open a merged pull request. Would it be ok to go ahead and open a new pull request from my branch? |
|
Your PR has not been merged. You just closed it. BTW feel free to open a new one if it is more convenient for you. Just don't forget to reference this PR |
|
Ah right, the PR has not been merged to jenkinsci-master yet, no. I was thinking of my merge from branch to lkisac-master. Unfortunately it's not showing that merge here as it was during my previous commits. I think the At any rate, I guess it would be easier to open a new one and reference this PR. |
I added a feature to store multiple values for the multi level select list.
It stores each selection and returns a string. This is an example with 3 levels for the multi select list:
{1:dropdown1value,dropdown2value,dropdown3value:2:dropdown1value,dropdown2value,dropdown3value:3:dropdown1value,dropdown2value,dropdown3value:} etc.
The Extended Choice Parameter field's name holds the string value.
Example (Jenkins Shell script):
echo ${Multi_Level_List}
I have a perl script that parses this string and build a hash containing all multi select values.
sub ParseMultiLevelString {
my $multiLevelString = shift;
my %hash;
my $eachMulti = 1; # i.e. { => 1:dropdownval1....}
}