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

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

XMLWordPrintable

      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.

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

              Created:
              Updated:
              Resolved: