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

Periodic Build Trigger Column not shown for Pipeline Jobs

    Details

    • Type: Bug
    • Status: Resolved (View Workflow)
    • Priority: Minor
    • Resolution: Fixed
    • Component/s: extra-columns-plugin
    • Labels:
    • Environment:
      jenkins 2.121.1
      extra-columns 1.19-SNAPSHOT (private-78d5adb8-jenkins)
    • Similar Issues:
    • Released As:
      extra-columns 1.19

      Description

      When the periodic-build-trigger column is added to a list view and a pipeline job which has a periodic build trigger is displayed in that view, then the periodic-build-trigger column is empty.

      Expected behavior: the value of the periodic build trigger of the pipeline job is displayed in the periodic-build-trigger column.

        Attachments

          Activity

          Hide
          oleg_nenashev Oleg Nenashev added a comment -

          CC Sam Van Oort rsandell Andrew Bayer . I am not 100% sure Pipeline offers API which would allow doing that

          Show
          oleg_nenashev Oleg Nenashev added a comment - CC Sam Van Oort rsandell Andrew Bayer . I am not 100% sure Pipeline offers API which would allow doing that
          Hide
          svanoort Sam Van Oort added a comment -

          Looks like the CronTriggerColumn has an explicit typecast to AbstractProject that will fail for Pipelines – https://github.com/jenkinsci/extra-columns-plugin/blob/master/src/main/java/jenkins/plugins/extracolumns/CronTriggerColumn.java#L62

          It would work if that we did an instanceof check for AbstractProject (and only cast to that if legal), then we could handle Pipeline jobs with

          Map<TriggerDescriptor, Trigger> triggers = null;
          if (job instanceof AbstractProject) {
              triggers  = ((AbstractProject)job).getTriggers();
          } if (job instanceof ParameterizedJobMixIn.ParameterizedJob) {
              triggers = ((ParameterizedJobMixIn.ParameterizedJob)job).getTriggers();
          }
          
          Show
          svanoort Sam Van Oort added a comment - Looks like the CronTriggerColumn has an explicit typecast to AbstractProject that will fail for Pipelines – https://github.com/jenkinsci/extra-columns-plugin/blob/master/src/main/java/jenkins/plugins/extracolumns/CronTriggerColumn.java#L62 It would work if that we did an instanceof check for AbstractProject (and only cast to that if legal), then we could handle Pipeline jobs with Map<TriggerDescriptor, Trigger> triggers = null ; if (job instanceof AbstractProject) { triggers = ((AbstractProject)job).getTriggers(); } if (job instanceof ParameterizedJobMixIn.ParameterizedJob) { triggers = ((ParameterizedJobMixIn.ParameterizedJob)job).getTriggers(); }
          Hide
          svanoort Sam Van Oort added a comment -

          Fred G If you want to further Pipeline-enable your plugin I suspect the above will get you there

          Show
          svanoort Sam Van Oort added a comment - Fred G If you want to further Pipeline-enable your plugin I suspect the above will get you there
          Hide
          fredg Fred G added a comment -

          Released in extra-columns plugin version 1.19.

          Show
          fredg Fred G added a comment - Released in extra-columns plugin version 1.19.
          Hide
          jgk Jürgen Kirschbaum added a comment -

          Thank you, works great.

          Show
          jgk Jürgen Kirschbaum added a comment - Thank you, works great.

            People

            • Assignee:
              jgk Jürgen Kirschbaum
              Reporter:
              jgk Jürgen Kirschbaum
            • Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: