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

Regex filters cause jobs to be explicitly selected in categorized views

XMLWordPrintable

      When creating a categorized view it is possible to setup a filter on the view using numerous options and plugins. It would appear that regardless which options you choose to use when configuring this filter, when you save your changes and attempt to edit the view the effects of whatever filter you have configured are transposed to explicitly selected / checked off jobs in the list of Jobs presented towards the top of the configuration page.

      For example, in the attached screen shot I created a categorized view with a regular expression of ".*ksp.*" and saved the changes. Then when I attempt to edit the view after the save and examine the list of available Jobs I see that all of the jobs that satisfy my regular expression are explicitly selected in the list.

      The most extreme case can be seen when using a regular expression to select all of the jobs on your farm for the view (ie: ".*"), or using custom filters such as "All Jobs" provided by the View Job Filters plugin. In these cases, after saving your changes for the new filter, subsequent edits will have every single job in the list explicitly checked off.

      This bug is especially annoying when you want to modify the filter. Take my example from my screen shot. If I decide to change the filter to something different, say ".*32" to show only 32bit jobs, when I submit my changes the original filter criteria is preserved and the new criteria appended to the actual set of jobs being displayed because the jobs that matched the original regular expression are now explicitly checked off, and they remain checked even when the regular expression changes.

      At first glance this seemed like it may be a bug with the Jenkins core, or maybe with one of the plugins I was using for creating these custom filters, however I have been unable to replicate the problem using views of any other type (list, sectioned, etc.). This leads me to believe the issue is with the categorized view plugin itself.

        1. filter_example.png
          24 kB
          Kevin Phillips
        2. submit_error.png
          44 kB
          Kevin Phillips

            Unassigned Unassigned
            leedega Kevin Phillips
            Votes:
            1 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: