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

Jobs created by doCreateItem start with build #0

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Minor Minor
    • core
    • None
    • Platform: All, OS: All

      If you create a job through the web UI, the first build is #1. If you post
      config.xml to /createItem?name=..., the first build is #0.

      Debugger confirms that when Job.onLoad is run, nextBuildNumber==0, despite

      protected transient volatile int nextBuildNumber = 1;

      Some XStream magic I suppose.

          [JENKINS-3361] Jobs created by doCreateItem start with build #0

          Jesse Glick created issue -

          Code changed in hudson
          User: : jglick
          Path:
          trunk/hudson/main/core/src/main/java/hudson/model/Job.java
          http://fisheye4.cenqua.com/changelog/hudson/?cs=16593
          Log:
          [FIXED JENKINS-3361] Programmatically created jobs started builds at #0 rather than #1.

          SCM/JIRA link daemon added a comment - Code changed in hudson User: : jglick Path: trunk/hudson/main/core/src/main/java/hudson/model/Job.java http://fisheye4.cenqua.com/changelog/hudson/?cs=16593 Log: [FIXED JENKINS-3361] Programmatically created jobs started builds at #0 rather than #1.
          SCM/JIRA link daemon made changes -
          Resolution New: Fixed [ 1 ]
          Status Original: Open [ 1 ] New: Resolved [ 5 ]

          Code changed in hudson
          User: : jglick
          Path:
          trunk/www/changelog.html
          http://fisheye4.cenqua.com/changelog/hudson/?cs=16594
          Log:
          JENKINS-3361 Noting.

          SCM/JIRA link daemon added a comment - Code changed in hudson User: : jglick Path: trunk/www/changelog.html http://fisheye4.cenqua.com/changelog/hudson/?cs=16594 Log: JENKINS-3361 Noting.
          Andrew Bayer made changes -
          Status Original: Resolved [ 5 ] New: Closed [ 6 ]
          R. Tyler Croy made changes -
          Workflow Original: JNJira [ 133434 ] New: JNJira + In-Review [ 202159 ]

            Unassigned Unassigned
            jglick Jesse Glick
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: