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

Failed to create empty listView

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Major Major
    • job-dsl-plugin
    • None
    • Jenkins 2.249.2
      Job-dsl-plugin 1.77

      I was attempting to create some initial views in a seeding job, These views have no job in the initial stage, but I got an error while running the job:

      ERROR: (script, line 8) No signature of method: java.lang.String.call() is applicable for argument types: () values: []
      Possible solutions: wait(), any(), wait(long), each(groovy.lang.Closure), take(int), any(groovy.lang.Closure)

      Here is my code:

      views = [ 'project-A': 'desc-A', 'project-B': 'desc-B' ]
      views.each { name, desc -> 
          listView("$name") {
              description("$desc")
              columns {
                  status()
                  weather()
                  name()
                  lastSuccess()
                  lastFailure()
                  lastDuration()
                  buildButton()
              }
          }
      }
      

      I've discovered if I remove the line:8 name(), the code can be successfully executed.

      However, in the api-view, name() doesn't take any argument. Besides I can manually create an empty view with all above columns from the WebUI, so I feel this could be a bug.

            jamietanna Jamie Tanna
            chsieh Franz Hsieh
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: