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

Pipeline build parts does not show up in build queue for views which filters build queue

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Component/s: core
    • Labels:
    • Environment:
      jenkins 2.77
    • Similar Issues:

      Description

      Noticed this one the other day, if you have a pipeline job with build parts in the queue and you're looking at a view with the filter build queue option, then the build part doesn't show up in the build queue.

      Notice how the build queue is empty in the second image while there clearly is a build part queued for the job test in the main view.

      The problem is that, in hudson.model.View#filterQueue(List<Queue.Item> base), it only checks if the queue task is in the list of filtered jobs, however that is not true for pipeline parts as the task is a step and not the job it self. To solve this, simply also check if Queue.Task#getOwnerTask() is in the list of filtered jobs (do this recursively).

      I will make a pull request for this, only problem is how to write a test for this, doesn't seem like there are any existing similar tests for views

      Suggestions and alternative solutions are welcome 

        Attachments

          Activity

            People

            • Assignee:
              jons Jon Sten
              Reporter:
              jons Jon Sten
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: