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

List view section: Job Statuses Filter on disabled doesn't work for pipeline jobs

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Minor Minor
    • 2.2

      Since JENKINS-27299 has been resolved, pipeline jobs can be disabled. But unfortunately filtering on disabled pipeline jobs with the Job Statuses Filter in a List View Section of a Sectioned View does not work, i.e. only non-pipeline jobs are shown.

      Remarks:

      • I tried it only with a normal pipeline job, not with a multi-pipeline, since currently I don't use those. I didn' try the other job statuses either.
      • Filtering on Stable and Unstable seem to work, didn't try Failed and Aborted.

          [JENKINS-51143] List view section: Job Statuses Filter on disabled doesn't work for pipeline jobs

          Wolfgang Kiendl created issue -
          Wolfgang Kiendl made changes -
          Summary Original: List view section: Job statuses Filter on disabled doesn't work for pipeline jobs New: List view section: Job Statuses Filter on disabled doesn't work for pipeline jobs
          jang hyemi (Inactive) made changes -
          Status Original: Open [ 1 ] New: In Progress [ 3 ]

          Did you check whether disabled freestyle jobs can be excluded?

          For me even excluding freestyle jobs won't work.

          Joerg Schwaerzler added a comment - Did you check whether disabled freestyle jobs can be excluded? For me even excluding freestyle jobs won't work.

          Yes, I am using this for freestyle jobs.

          I have a List View Section with a "Regular Expression Job Filter" on "Job schedule" with "Include Matched" and a "Job Statuses Filter" with the Disabled checkbox on in the Job Statuses and the "Match Type" is "Exclude Matched". Works fine for freestyle jobs.

          For pipeline jobs it fails, because the filtering on Job schedule doesn't work (separately reported issue), so I first have a "Job Type Filter" on Job Type "Pipeline" with "Include Matched" and the again the Job Statuses Filter. Disabled jobs are still shown.

          I also have a view of disabled jobs, where I have just a "Job Statuses Filter" with the Disabled checkbox on in the Job Statuses and the "Match Type" is "Include Matched" and I just see the freestyle jobs.

          In all views no explicit jobs are selected and "Use regular expression to include jobs into the view" is off. I think combining that checkbox with filters didn't work for me at all.

          Wolfgang Kiendl added a comment - Yes, I am using this for freestyle jobs. I have a List View Section with a "Regular Expression Job Filter" on "Job schedule" with "Include Matched" and a "Job Statuses Filter" with the Disabled checkbox on in the Job Statuses and the "Match Type" is "Exclude Matched". Works fine for freestyle jobs. For pipeline jobs it fails, because the filtering on Job schedule doesn't work (separately reported issue), so I first have a "Job Type Filter" on Job Type "Pipeline" with "Include Matched" and the again the Job Statuses Filter. Disabled jobs are still shown. I also have a view of disabled jobs, where I have just a "Job Statuses Filter" with the Disabled checkbox on in the Job Statuses and the "Match Type" is "Include Matched" and I just see the freestyle jobs. In all views no explicit jobs are selected and "Use regular expression to include jobs into the view" is off. I think combining that checkbox with filters didn't work for me at all.

          Thanks for the quick answer.

          I checked the code and it's quite obvious why the disabled filter won't work for pipeline jobs. Just got the plugin to compile and test on my machine. I'll now see whether I can fix it - and hopefully do a proper PR.

          Joerg Schwaerzler added a comment - Thanks for the quick answer. I checked the code and it's quite obvious why the disabled filter won't work for pipeline jobs. Just got the plugin to compile and test on my machine. I'll now see whether I can fix it - and hopefully do a proper PR.

          Moritz Knolle added a comment - - edited

          Moritz Knolle added a comment - - edited https://github.com/jenkinsci/view-job-filters-plugin/pull/11 opened PR with a fix

          Great, thanks!

          Works like a charm

          Joerg Schwaerzler added a comment - Great, thanks! Works like a charm

          Looks like the pull request from knolle came little bit late so it needs a merge first. As knolle currently won't have time to do the merge I discussed with him and will take over the PR and do the merge.

          Joerg Schwaerzler added a comment - Looks like the pull request from knolle came little bit late so it needs a merge first. As knolle currently won't have time to do the merge I discussed with him and will take over the PR and do the merge.

          tbingaman, svenschoenung: We're still preparing the PR which initially was created by knolle - we're almost done. Wonder whether so else is working on that topic as well. Please let us know.

          Joerg Schwaerzler added a comment - tbingaman , svenschoenung : We're still preparing the PR which initially was created by knolle - we're almost done. Wonder whether so else is working on that topic as well. Please let us know.

            jglick Jesse Glick
            wolfgangk Wolfgang Kiendl
            Votes:
            4 Vote for this issue
            Watchers:
            9 Start watching this issue

              Created:
              Updated:
              Resolved: