Issue Type: Bug Bug
Assignee: Unassigned
Components: core
Created: 11/Feb/14 7:24 PM
Description:

In the gerrit-trigger plugin, we have a Describable<GerritServer>. In the form, there is a select that gets populated using the doFillDefaultSlaveIdItems method but it requires the name of server so I used @QueryParameter("name"). I tested this new section against jenkins 1.480.3 since the plugin is compiling against that version and it works fine.

When I tested against the latest lts (1.532.1) the serverName parameter of the doFillDefaultSlaveIdItems is always null. In the _javascript_ console, there is the following error:
"Unable to find nearby name" in hudson-behavior.js.

I isolated that the problem was introduced by this commit(1.526):

commit bbaeade5231ca4116047fbd32b2f909a16a59b8d
Author: Kohsuke Kawaguchi <[email protected]>
Date:   Tue Jul 16 12:30:14 2013 -0700

    this needs to happen at least after the rowset name/nameRef fixup happens.
    
    Since I don't think any other scripts depend on this one, I'm just giving it a low enough priority.

The code is not in the gerrit-trigger master yet so but let me know if you need it, I could push it to my fork.

Here is a sample of its jelly file:

<f:form method="post" action="" class="code-quote">"configSubmit" name="config">
...
  <f:entry title="${%Name}">
    <f:textbox name="name" value="${it.name}"/>
  </f:entry>
...
  <f:section title="${%Replication Events}">
  <f:optionalBlock name="enableReplication" title="${%Enable Triggering On Replication}" checked="${it.config.replicationConfig.enableReplication}">
    ...
    <f:optionalBlock name="enableSlaveSelectionInJobs" title="${%Allow Slave Selection in Job Configurations}" checked="${it.config.replicationConfig.enableSlaveSelectionInJobs}">
      <f:entry title="${%Choose a default slave}" field="defaultSlaveId">
        <f:select/>
      </f:entry>
    </f:optionalBlock>
  </f:optionalBlock>
</f:section>
</form>

Here the method defined in the Descriptor:

public ListBoxModel doFillDefaultSlaveIdItems(@QueryParameter("name") final String serverName) {
  ListBoxModel items = new ListBoxModel();
...
}
Project: Jenkins
Labels: regression
Priority: Major Major
Reporter: Hugo Ares
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators.
For more information on JIRA, see: http://www.atlassian.com/software/jira

--
You received this message because you are subscribed to the Google Groups "Jenkins Issues" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to