The Jenkins jobs we are using with active-choices-plugin (reactive) are stored within a cetrain folder structure, which is enabled by cloudbees-folder plugin. There may be several jobs with the same name. Sample Jenkins folder structure:
For a hudson.model.Project, getName() would return "Job1" and getFullName() would return the whole Pathname.
This seems to make a difference while using the jenkinsProject binding, which evaluates based on the getName(). During my test this was correctly evaluated only if "Job1" was at the topmost level of hierarchy, not in any folder. (Our use case is easily obtaining the customWorkspace value from jenkinsProject dynamically... and this was just a side effect)
In method getProjectByName(), currently the condition checked is "p.getName().equals(projectName)".
Please consider using "p.getFullName().equals(projectName)" instead in case of folder hierarchy.
Looks like this is affected by the AbstractScriptableParameter inherited constructor, being the origin of the projectName value using AbstractItem.getName() - please consider using getFullName() instead.
Thanks a lot!