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

"Derived" views in folders should show only jobs that are part of that folder

    Details

    • Type: Improvement
    • Status: Open (View Workflow)
    • Priority: Minor
    • Resolution: Unresolved
    • Component/s: core
    • Labels:
    • Environment:
      1.580.1, folders: 4.7
    • Similar Issues:

      Description

      I'm not sure if this is a bug or a new improvement:

      I have several folders with round about 100 jobs in each of them. My requirement is to reuse the same view to show the results of the jobs of every folder.
      So I tried to create a new top-level Jenkins view that defines the view columns to use. Then I added this view in every folder as new view using the + button and the option "Include a global view".

      However, when I select this view in a folder, then the listed jobs are all jobs that are visible in the top-level view. I think there should be at least an option to show only those jobs here that are part of the selected folder.

        Attachments

          Activity

          Hide
          jglick Jesse Glick added a comment -

          Never heard of anyone trying to use derived views this way. The expectation is that each folder has its own set of views, and if you want to share some configuration across folders, you copy them. And if you want to avoid copying, you do so the same way you would share any configuration across any items: use the Templates plugin in the case of Jenkins Enterprise, or various OSS plugins which purport to solve DRY (not sure if any can handle arbitrary Item s like Folder s though).

          Show
          jglick Jesse Glick added a comment - Never heard of anyone trying to use derived views this way. The expectation is that each folder has its own set of views, and if you want to share some configuration across folders, you copy them. And if you want to avoid copying, you do so the same way you would share any configuration across any items: use the Templates plugin in the case of Jenkins Enterprise, or various OSS plugins which purport to solve DRY (not sure if any can handle arbitrary Item s like Folder s though).
          Hide
          jglick Jesse Glick added a comment -

          Not to say that such an option for Include a global view would not make sense, just that this is only one way of addressing the ultimate requirement.

          Show
          jglick Jesse Glick added a comment - Not to say that such an option for Include a global view would not make sense, just that this is only one way of addressing the ultimate requirement.
          Hide
          drulli Ulli Hafner added a comment -

          I see. I don't think that a plugin exists that allows to reuse another view. Maybe a simpler way would be if every Jenkins item (job, view, etc.) would have a copy action. (Copying still violates DRY but is better than manually creating the same view again in a different folders.)

          What is then a typical usecase for the radiobutton "include a global view"?

          Show
          drulli Ulli Hafner added a comment - I see. I don't think that a plugin exists that allows to reuse another view. Maybe a simpler way would be if every Jenkins item (job, view, etc.) would have a copy action. (Copying still violates DRY but is better than manually creating the same view again in a different folders.) What is then a typical usecase for the radiobutton "include a global view"?
          Hide
          jglick Jesse Glick added a comment -

          I don't think that a plugin exists that allows to reuse another view.

          Well as I say CloudBees Templates would allow the folder, including its view list, to be parameterized. Whether there are ways of doing this with other plugins, I am not sure.

          A way to quickly copy a view would make sense. View.create does support copy mode; I am not sure if this is exposed in the UI yet or not. Certainly you can do it via REST or CLI.

          What is then a typical usecase for the radiobutton "include a global view"?

          Like so many features in Jenkins, I am not really sure.

          Show
          jglick Jesse Glick added a comment - I don't think that a plugin exists that allows to reuse another view. Well as I say CloudBees Templates would allow the folder, including its view list, to be parameterized. Whether there are ways of doing this with other plugins, I am not sure. A way to quickly copy a view would make sense. View.create does support copy mode; I am not sure if this is exposed in the UI yet or not. Certainly you can do it via REST or CLI. What is then a typical usecase for the radiobutton "include a global view"? Like so many features in Jenkins, I am not really sure.
          Hide
          danielbeck Daniel Beck added a comment -

          View.create does support copy mode; I am not sure if this is exposed in the UI yet or not.

          https://github.com/jenkinsci/jenkins/commit/1067585a49517414398b3becbebed09abf496761 / JENKINS-13978 seem to indicate it's not.

          Show
          danielbeck Daniel Beck added a comment - View.create does support copy mode; I am not sure if this is exposed in the UI yet or not. https://github.com/jenkinsci/jenkins/commit/1067585a49517414398b3becbebed09abf496761 / JENKINS-13978 seem to indicate it's not.

            People

            • Assignee:
              Unassigned
              Reporter:
              drulli Ulli Hafner
            • Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated: