[ 
https://issues.jenkins-ci.org/browse/JENKINS-13742?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=162799#comment-162799
 ] 

John McNally commented on JENKINS-13742:
----------------------------------------

In case the short presentation of the plugin code is not clear, here is the 
entire commit:
https://github.com/jenkinsci/collabnet-plugin/commit/4c7b516a7975ffc126ddf717476cefe4e0a84081
                
> Field validation does not pass required query parameters when some fields are 
> specified in a nested Describable
> ---------------------------------------------------------------------------------------------------------------
>
>                 Key: JENKINS-13742
>                 URL: https://issues.jenkins-ci.org/browse/JENKINS-13742
>             Project: Jenkins
>          Issue Type: Bug
>          Components: collabnet, core, validating-string-parameter
>    Affects Versions: current
>         Environment: Problem is not environment dependent, but testing was on 
> Ubuntu 10.04 using Firefox 11 as client.
>            Reporter: John McNally
>            Assignee: whsu
>              Labels: jenkins
>         Attachments: findNearBy.patch
>
>
> The collabnet plugin was updated/modernized a couple years ago to include 
> code like the following:
> CNDocumentUploader.java DescriptorImpl
> /**
>   * Form validation for upload path.
>   */
> public FormValidation doCheckUploadPath(CollabNetApp app, @QueryParameter 
> String project, @QueryParameter String value)
> CollabNetApp.java
>     public static CollabNetApp fromStapler(@QueryParameter boolean 
> overrideAuth, @QueryParameter String url,
>                                            @QueryParameter String username, 
> @QueryParameter String password) 
> config.jelly
>   <f:property field="connectionFactory" />
> ...
>   <f:entry title="Upload Folder Path" field="uploadPath">
>     <f:textbox />
>   </f:entry>
> ConnectionFactory has url, username, and password properties
> The generated field validation javascript then uses the 'nearBy' function 
> when passing query parameters to the checkUploadPath backend in order to find 
> values of url, username, and password.  However uploadPath has a parent 
> element with name 'publisher', while the direct parent of url, username, and 
> password is a div has name 'connectionFactory'.  'publisher' is then a 
> grandparent of url, username, and password and because of this, the needed 
> query parameters are not included.
> One might argue that the collabnet plugin should avoid this design, since it 
> does not work, but the changes came from Kohsuke, so attempting find a fix 
> which preserves the current design.
> A patch to the findNearBy function in hudson-behavior.js is attached.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.jenkins-ci.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to