Script Console updates jobs without save

This issue is archived. You can view it, but you can't modify it. Learn more

XMLWordPrintable

      I have noticed when running scripts in the Management scripting console that jobs are updated immediately, even when there is no jop.save invoked.

      Not sure if this is a deliberate change in the API, but can't find much documentation about this.
      http://javadoc.jenkins-ci.org/hudson/model/Job.html#save%28%29

      For instance:

      Jenkins.instance.items.each { job ->
        println "--- $job.name"
        job.disabled=true
        //job.save() // this line is commented out, but all jobs are disabled
      }
      

      It may be my expectations, that not saving a job would mean no changes are made. I have encountered this when performing mass operation on SCM components and adding/updating build components.

            Assignee:
            Unassigned
            Reporter:
            Marcus Collins
            Archiver:
            Jenkins Service Account

              Created:
              Updated:
              Resolved:
              Archived: