Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-9113

"Copy existing job" autocompletion does not work

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Duplicate
    • Component/s: core
    • Labels:
      None
    • Environment:
      Jenkins 1.403

      Description

      I'm trying to create a new job as a copy of an existing job.
      When I enter the name of the job to copy:

      • the suggestion list only displays a few (exactly 10) of the available jobs
      • the suggestion list does not change to match the typed prefix
      • tabbing out of the input box replaces its contents with the first suggestion (which does not match what I typed at all) unless I use the arrows to choose another suggestion

      So I can only copy one of the alphabetically first 10 jobs defined in Jenkins and even that is not easy.

        Issue Links

          Activity

          Hide
          mdp mdp added a comment -

          Workaround: actually I have a workaround for the third point. Pressing the up arrow makes the suggestion box disappear and then tabbing out of the input box does not destroy its contents.

          Show
          mdp mdp added a comment - Workaround: actually I have a workaround for the third point. Pressing the up arrow makes the suggestion box disappear and then tabbing out of the input box does not destroy its contents.
          Hide
          kohsuke Kohsuke Kawaguchi added a comment -

          What's the browser?

          Show
          kohsuke Kohsuke Kawaguchi added a comment - What's the browser?
          Hide
          mdp mdp added a comment -

          It happens with Firefox 3.5.17 and with Epiphany 2.30.6
          I will try to test my other browsers too.

          Show
          mdp mdp added a comment - It happens with Firefox 3.5.17 and with Epiphany 2.30.6 I will try to test my other browsers too.
          Hide
          pmv pmv added a comment -

          Doesn't appear to be browser specific. The suggestions don't change on any of the browsers I tested. (Firefox 4, Chrome 10.0.648.151, IE 8)

          Show
          pmv pmv added a comment - Doesn't appear to be browser specific. The suggestions don't change on any of the browsers I tested. (Firefox 4, Chrome 10.0.648.151, IE 8)
          Hide
          sogabe sogabe added a comment -

          ViewDescriptor.java #67

              public AutoCompletionCandidates doAutoCompleteCopyNewItemFrom(@QueryParameter final String value) {
                  final AutoCompletionCandidates r = new AutoCompletionCandidates();
          
                  new ItemVisitor() {
                      @Override
                      public void onItemGroup(ItemGroup<?> group) {
                          // only dig deep when the path matches what's typed.
                          // for example, if 'foo/bar' is typed, we want to show 'foo/barcode'
                          if (value.startsWith(group.getFullName()))                                                    <-- (A)
                                  super.onItemGroup(group);
                       }
          
                      @Override
                      public void onItem(Item i) {
                          r.add(i.getFullName());
                          super.onItem(i);
                      }
                  }.onItemGroup(Hudson.getInstance());
          
                  return r;
              }
          

          (A) is always "true" because Hudson.getInstace().getFullName() is empty string.

          Show
          sogabe sogabe added a comment - ViewDescriptor.java #67 public AutoCompletionCandidates doAutoCompleteCopyNewItemFrom(@QueryParameter final String value) { final AutoCompletionCandidates r = new AutoCompletionCandidates(); new ItemVisitor() { @Override public void onItemGroup(ItemGroup<?> group) { // only dig deep when the path matches what's typed. // for example, if 'foo/bar' is typed, we want to show 'foo/barcode' if (value.startsWith(group.getFullName())) <-- (A) super .onItemGroup(group); } @Override public void onItem(Item i) { r.add(i.getFullName()); super .onItem(i); } }.onItemGroup(Hudson.getInstance()); return r; } (A) is always "true" because Hudson.getInstace().getFullName() is empty string.
          Hide
          tonioska tonioska added a comment -

          Hi Sogabe,

          Please mark JENKINS 9384 as duplicate of 9113 and not the other way around.

          Its seems now that the issue is one day old instead of 1 month old.

          Thanks.

          Show
          tonioska tonioska added a comment - Hi Sogabe, Please mark JENKINS 9384 as duplicate of 9113 and not the other way around. Its seems now that the issue is one day old instead of 1 month old. Thanks.

            People

            • Assignee:
              Unassigned
              Reporter:
              mdp mdp
            • Votes:
              4 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: