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

Source Code Management for build job is forgotten on save

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Blocker Blocker
    • core
    • Jenkins 2.225

       Source Code Management for build, seems to be forgotten when saving or applying and then leaving page. All other changes on page seem to be correctly stored, but when reloading page SCM is reset to None. This error is not git specific, and also is present for mercurial.

      Issue is present on v.2.224 but not on v.2.223.
      Fixed issue by rolling back to previous version.

        1. after load.PNG
          after load.PNG
          6 kB
        2. screenshot-1.png
          screenshot-1.png
          231 kB
        3. screenshot-2.png
          screenshot-2.png
          122 kB
        4. SourceCodeManagement.png
          SourceCodeManagement.png
          34 kB
        5. this.png
          this.png
          66 kB

          [JENKINS-61398] Source Code Management for build job is forgotten on save

          Oleg Nenashev added a comment -

          JENKINS-51495 is suspected to be the root cause, because it modifies descriptorRadioList  being used in SCM configuration sections

          Oleg Nenashev added a comment - JENKINS-51495 is suspected to be the root cause, because it modifies descriptorRadioList  being used in SCM configuration sections

          Mark Waite added a comment -

          Thanks oleg_nenashev. I've confirmed that I can duplicate the problem with the tip of the master branch and it is no longer visible if I revert the JENKINS-51495 change. Should I submit a pull request to revert the change or would you prefer to approach it differently?

          Mark Waite added a comment - Thanks oleg_nenashev . I've confirmed that I can duplicate the problem with the tip of the master branch and it is no longer visible if I revert the JENKINS-51495 change . Should I submit a pull request to revert the change or would you prefer to approach it differently?

          Tim Jacomb added a comment - - edited

          Looking at it in a debugger:

          String descriptorId = config.getString("value");

          is equal to 1

          'this' returns a list with a null scm and a git scm

          getting the id on the git scm returns the class name

          and
          1 is not equal to hudson.plugins.git.GitSCM

          so the check fails and it defaults to the first item in the list (nullscm)

          Tim Jacomb added a comment - - edited Looking at it in a debugger: String descriptorId = config.getString("value"); is equal to 1 'this' returns a list with a null scm and a git scm getting the id on the git scm returns the class name and 1 is not equal to hudson.plugins.git.GitSCM so the check fails and it defaults to the first item in the list (nullscm)

          Tim Jacomb added a comment -

          PR submitted: https://github.com/jenkinsci/jenkins/pull/4560

          I had a look in core and couldn't see any other issues with this.

          Tim Jacomb added a comment - PR submitted: https://github.com/jenkinsci/jenkins/pull/4560 I had a look in core and couldn't see any other issues with this.

          Mark Waite added a comment -

          Merged for Jenkins 2.225

          Mark Waite added a comment - Merged for Jenkins 2.225

            markewaite Mark Waite
            martin_breistein Martin Breistein
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved: