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

Ability to sort or group /lib/hudson/newFromList:form

    XMLWordPrintable

Details

    Description

      If you want to add e.g. new job types dynamically for display in View/newJob.jelly, as cloudbees-template does, you have no real control over where they appear: they are sorted by display name, intermixed with built-in types. (Descriptors added using @Extension can probably specify ordinal to affect sort order, but that does not work for dynamically-registered descriptors.) It would be nice to be able to affect the sort order, or even group related things together under a header or expandable box. Possibilities include:

      1. Make ${jobs} in newJob.jelly—or more generically, ${descriptors} in form.jelly—be sortable or groupable by DescriptorVisibilityFilter (or a new extension point).
      2. Add an overridable method to Descriptor (or at least TopLevelItemDescriptor, but this could be useful e.g. for BuilderDescriptor too) specifying a sort position, or category name for grouping.
      3. Add a method to ExtensionList allowing a custom ExtensionComponent to be added directly; or, equivalently, an add overload taking an ordinal. Permits custom sorting (to some extent) but not grouping.
      4. Make form.jelly or one of its callers automatically sort by some internal criterion such as by leaf traversal of the inheritance tree. Would make sort order a bit more regular and logical, but allow no fine-tuning.

      Attachments

        Issue Links

          Activity

            jglick Jesse Glick created issue -
            danielbeck Daniel Beck made changes -
            Field Original Value New Value
            Labels api ui 2.0 api ui
            kohsuke Kohsuke Kawaguchi made changes -
            Epic Link JENKINS-31156 [ 165812 ]
            jglick Jesse Glick added a comment -

            gusreiber had a more ambitious version of this floating around in mockup form.

            jglick Jesse Glick added a comment - gusreiber had a more ambitious version of this floating around in mockup form.
            danielbeck Daniel Beck made changes -
            Labels 2.0 api ui 2.0-planned api ui
            danielbeck Daniel Beck made changes -
            Labels 2.0-planned api ui 2.0 2.0-planned api ui
            kohsuke Kohsuke Kawaguchi made changes -
            Link This issue duplicates JENKINS-31162 [ JENKINS-31162 ]

            JENKINS-31162 is where the action is happening now, so consolidating

            kohsuke Kohsuke Kawaguchi added a comment - JENKINS-31162 is where the action is happening now, so consolidating
            kohsuke Kohsuke Kawaguchi made changes -
            Resolution Duplicate [ 3 ]
            Status Open [ 1 ] Resolved [ 5 ]
            rtyler R. Tyler Croy made changes -
            Workflow JNJira [ 151712 ] JNJira + In-Review [ 194061 ]

            People

              Unassigned Unassigned
              jglick Jesse Glick
              Votes:
              1 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: