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

Fingerprint information not kept up to date if project is renamed

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major Major
    • core
    • None

      The fingerprint record contains the names of projects. However, if the project is renamed, the link to the usage or originator is lost. Furthermore, if another project is created with that name, then the fingerprint points to the new project.

      Fingerprint records should be updated when projects are renamed.

          [JENKINS-10330] Fingerprint information not kept up to date if project is renamed

          Code changed in jenkins
          User: dty
          Path:
          changelog.html
          core/src/main/java/hudson/model/AbstractBuild.java
          core/src/main/java/hudson/model/Fingerprint.java
          test/src/test/java/hudson/tasks/FingerprinterTest.java
          http://jenkins-ci.org/commit/jenkins/8dfa5e19ea94195e9737f99457297623d4180c7f
          Log:
          [FIX JENKINS-10330] Update project names in fingerprints when projects are renamed.

          • Added a RenameListener to Fingerprint. When the listener is invoked for
            renamed projects, it will iterate over all the builds of the project looking
            for fingerprint actions. If the build was the originator of the fingerprint,
            the buildPtr is updated; (had to make the name non-final to allow for this).
            If the build is the consumer of a fingerprint, the usages are updated.

          core/src/main/java/hudson/model/Fingerprint.java

          • Expose the fingerprint data inline with the build data in the remote API.
            The renaming code also uses this method as a convenient way to get the
            fingerprints for a build.

          core/src/main/java/hudson/model/AbstractBuild.java

          • Test.

          test/src/test/java/hudson/tasks/FingerprinterTest.java

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: dty Path: changelog.html core/src/main/java/hudson/model/AbstractBuild.java core/src/main/java/hudson/model/Fingerprint.java test/src/test/java/hudson/tasks/FingerprinterTest.java http://jenkins-ci.org/commit/jenkins/8dfa5e19ea94195e9737f99457297623d4180c7f Log: [FIX JENKINS-10330] Update project names in fingerprints when projects are renamed. Added a RenameListener to Fingerprint. When the listener is invoked for renamed projects, it will iterate over all the builds of the project looking for fingerprint actions. If the build was the originator of the fingerprint, the buildPtr is updated; (had to make the name non-final to allow for this). If the build is the consumer of a fingerprint, the usages are updated. core/src/main/java/hudson/model/Fingerprint.java Expose the fingerprint data inline with the build data in the remote API. The renaming code also uses this method as a convenient way to get the fingerprints for a build. core/src/main/java/hudson/model/AbstractBuild.java Test. test/src/test/java/hudson/tasks/FingerprinterTest.java

          dogfood added a comment -

          Integrated in jenkins_main_trunk #1078
          [FIX JENKINS-10330] Update project names in fingerprints when projects are renamed.

          dty : 8dfa5e19ea94195e9737f99457297623d4180c7f
          Files :

          • changelog.html
          • core/src/main/java/hudson/model/Fingerprint.java
          • test/src/test/java/hudson/tasks/FingerprinterTest.java
          • core/src/main/java/hudson/model/AbstractBuild.java

          dogfood added a comment - Integrated in jenkins_main_trunk #1078 [FIX JENKINS-10330] Update project names in fingerprints when projects are renamed. dty : 8dfa5e19ea94195e9737f99457297623d4180c7f Files : changelog.html core/src/main/java/hudson/model/Fingerprint.java test/src/test/java/hudson/tasks/FingerprinterTest.java core/src/main/java/hudson/model/AbstractBuild.java

          Dean Yu added a comment -

          Fixed towards 1.429 release.

          Dean Yu added a comment - Fixed towards 1.429 release.

          Code changed in jenkins
          User: dty
          Path:
          changelog.html
          core/src/main/java/hudson/model/AbstractBuild.java
          core/src/main/java/hudson/model/Fingerprint.java
          test/src/test/java/hudson/tasks/FingerprinterTest.java
          http://jenkins-ci.org/commit/jenkins/8dfa5e19ea94195e9737f99457297623d4180c7f
          Log:
          [FIX JENKINS-10330] Update project names in fingerprints when projects are renamed.

          • Added a RenameListener to Fingerprint. When the listener is invoked for
            renamed projects, it will iterate over all the builds of the project looking
            for fingerprint actions. If the build was the originator of the fingerprint,
            the buildPtr is updated; (had to make the name non-final to allow for this).
            If the build is the consumer of a fingerprint, the usages are updated.

          core/src/main/java/hudson/model/Fingerprint.java

          • Expose the fingerprint data inline with the build data in the remote API.
            The renaming code also uses this method as a convenient way to get the
            fingerprints for a build.

          core/src/main/java/hudson/model/AbstractBuild.java

          • Test.

          test/src/test/java/hudson/tasks/FingerprinterTest.java

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: dty Path: changelog.html core/src/main/java/hudson/model/AbstractBuild.java core/src/main/java/hudson/model/Fingerprint.java test/src/test/java/hudson/tasks/FingerprinterTest.java http://jenkins-ci.org/commit/jenkins/8dfa5e19ea94195e9737f99457297623d4180c7f Log: [FIX JENKINS-10330] Update project names in fingerprints when projects are renamed. Added a RenameListener to Fingerprint. When the listener is invoked for renamed projects, it will iterate over all the builds of the project looking for fingerprint actions. If the build was the originator of the fingerprint, the buildPtr is updated; (had to make the name non-final to allow for this). If the build is the consumer of a fingerprint, the usages are updated. core/src/main/java/hudson/model/Fingerprint.java Expose the fingerprint data inline with the build data in the remote API. The renaming code also uses this method as a convenient way to get the fingerprints for a build. core/src/main/java/hudson/model/AbstractBuild.java Test. test/src/test/java/hudson/tasks/FingerprinterTest.java

            dty Dean Yu
            dty Dean Yu
            Votes:
            1 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: