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

ItemListener.onMoved

    XMLWordPrintable

    Details

    • Similar Issues:

      Description

      The CloudBees Folders plugin offers a function to move a job from one item group (folder, Jenkins root) to another. But since ItemListener has no onMoved method, it has to fire a deletion event from the old location and then a create event in the new location. This prevents core and plugins from updating item fullName references, for example in BuildTrigger.

      onRenamed does not suffice since this is documented to deal with name, not fullName.

        Attachments

          Issue Links

            Activity

            Hide
            scm_issue_link SCM/JIRA link daemon added a comment -

            Code changed in jenkins
            User: Jesse Glick
            Path:
            core/src/main/java/hudson/model/AbstractItem.java
            core/src/main/java/hudson/model/ItemGroupMixIn.java
            core/src/main/java/hudson/model/Items.java
            core/src/main/java/hudson/model/listeners/ItemListener.java
            core/src/main/java/jenkins/model/DirectlyModifiableTopLevelItemGroup.java
            core/src/main/java/jenkins/model/Jenkins.java
            test/src/main/java/org/jvnet/hudson/test/MockFolder.java
            test/src/test/java/org/jvnet/hudson/test/MockFolderTest.java
            http://jenkins-ci.org/commit/jenkins/9fc87f4a22ef4e32445451f5114fb800b6b73e9e
            Log:
            [FIXED JENKINS-18028] Providing a supported way to move an item between folders, firing changes as we go.

            Show
            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Jesse Glick Path: core/src/main/java/hudson/model/AbstractItem.java core/src/main/java/hudson/model/ItemGroupMixIn.java core/src/main/java/hudson/model/Items.java core/src/main/java/hudson/model/listeners/ItemListener.java core/src/main/java/jenkins/model/DirectlyModifiableTopLevelItemGroup.java core/src/main/java/jenkins/model/Jenkins.java test/src/main/java/org/jvnet/hudson/test/MockFolder.java test/src/test/java/org/jvnet/hudson/test/MockFolderTest.java http://jenkins-ci.org/commit/jenkins/9fc87f4a22ef4e32445451f5114fb800b6b73e9e Log: [FIXED JENKINS-18028] Providing a supported way to move an item between folders, firing changes as we go.
            Hide
            scm_issue_link SCM/JIRA link daemon added a comment -

            Code changed in jenkins
            User: Jesse Glick
            Path:
            test/src/test/groovy/hudson/model/AbstractProjectTest.groovy
            http://jenkins-ci.org/commit/jenkins/554be78b9b79eb662d8426f0ace2115a509f7406
            Log:
            JENKINS-18678 JENKINS-18028 Confirming (as suggested in #1069 by @oleg-nenashev) that build history is retained after a move into a folder.

            Show
            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Jesse Glick Path: test/src/test/groovy/hudson/model/AbstractProjectTest.groovy http://jenkins-ci.org/commit/jenkins/554be78b9b79eb662d8426f0ace2115a509f7406 Log: JENKINS-18678 JENKINS-18028 Confirming (as suggested in #1069 by @oleg-nenashev) that build history is retained after a move into a folder.
            Hide
            scm_issue_link SCM/JIRA link daemon added a comment -

            Code changed in jenkins
            User: Jesse Glick
            Path:
            changelog.html
            core/src/main/java/hudson/model/Items.java
            core/src/main/java/hudson/model/listeners/ItemListener.java
            core/src/main/java/jenkins/model/DirectlyModifiableTopLevelItemGroup.java
            http://jenkins-ci.org/commit/jenkins/6ca99ff8c241769959dec4b31257a54a22e340a6
            Log:
            [FIXED JENKINS-20008] [FIXED JENKINS-18028] [FIXED JENKINS-18680] #1069: support for moving jobs into or out of folders.

            Compare: https://github.com/jenkinsci/jenkins/compare/dda099c19a7a...6ca99ff8c241

            Show
            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Jesse Glick Path: changelog.html core/src/main/java/hudson/model/Items.java core/src/main/java/hudson/model/listeners/ItemListener.java core/src/main/java/jenkins/model/DirectlyModifiableTopLevelItemGroup.java http://jenkins-ci.org/commit/jenkins/6ca99ff8c241769959dec4b31257a54a22e340a6 Log: [FIXED JENKINS-20008] [FIXED JENKINS-18028] [FIXED JENKINS-18680] #1069: support for moving jobs into or out of folders. Compare: https://github.com/jenkinsci/jenkins/compare/dda099c19a7a...6ca99ff8c241
            Hide
            dogfood dogfood added a comment -

            Integrated in jenkins_main_trunk #3154
            [FIXED JENKINS-18028] Providing a supported way to move an item between folders, firing changes as we go. (Revision 9fc87f4a22ef4e32445451f5114fb800b6b73e9e)
            JENKINS-18678 JENKINS-18028 Confirming (as suggested in #1069 by @oleg-nenashev) that build history is retained after a move into a folder. (Revision 554be78b9b79eb662d8426f0ace2115a509f7406)
            [FIXED JENKINS-20008] [FIXED JENKINS-18028] [FIXED JENKINS-18680] #1069: support for moving jobs into or out of folders. (Revision 6ca99ff8c241769959dec4b31257a54a22e340a6)

            Result = SUCCESS
            Jesse Glick : 9fc87f4a22ef4e32445451f5114fb800b6b73e9e
            Files :

            • test/src/main/java/org/jvnet/hudson/test/MockFolder.java
            • core/src/main/java/jenkins/model/Jenkins.java
            • core/src/main/java/jenkins/model/DirectlyModifiableTopLevelItemGroup.java
            • core/src/main/java/hudson/model/AbstractItem.java
            • core/src/main/java/hudson/model/Items.java
            • test/src/test/java/org/jvnet/hudson/test/MockFolderTest.java
            • core/src/main/java/hudson/model/listeners/ItemListener.java
            • core/src/main/java/hudson/model/ItemGroupMixIn.java

            Jesse Glick : 554be78b9b79eb662d8426f0ace2115a509f7406
            Files :

            • test/src/test/groovy/hudson/model/AbstractProjectTest.groovy

            Jesse Glick : 6ca99ff8c241769959dec4b31257a54a22e340a6
            Files :

            • changelog.html
            • core/src/main/java/hudson/model/listeners/ItemListener.java
            • core/src/main/java/jenkins/model/DirectlyModifiableTopLevelItemGroup.java
            • core/src/main/java/hudson/model/Items.java
            Show
            dogfood dogfood added a comment - Integrated in jenkins_main_trunk #3154 [FIXED JENKINS-18028] Providing a supported way to move an item between folders, firing changes as we go. (Revision 9fc87f4a22ef4e32445451f5114fb800b6b73e9e) JENKINS-18678 JENKINS-18028 Confirming (as suggested in #1069 by @oleg-nenashev) that build history is retained after a move into a folder. (Revision 554be78b9b79eb662d8426f0ace2115a509f7406) [FIXED JENKINS-20008] [FIXED JENKINS-18028] [FIXED JENKINS-18680] #1069: support for moving jobs into or out of folders. (Revision 6ca99ff8c241769959dec4b31257a54a22e340a6) Result = SUCCESS Jesse Glick : 9fc87f4a22ef4e32445451f5114fb800b6b73e9e Files : test/src/main/java/org/jvnet/hudson/test/MockFolder.java core/src/main/java/jenkins/model/Jenkins.java core/src/main/java/jenkins/model/DirectlyModifiableTopLevelItemGroup.java core/src/main/java/hudson/model/AbstractItem.java core/src/main/java/hudson/model/Items.java test/src/test/java/org/jvnet/hudson/test/MockFolderTest.java core/src/main/java/hudson/model/listeners/ItemListener.java core/src/main/java/hudson/model/ItemGroupMixIn.java Jesse Glick : 554be78b9b79eb662d8426f0ace2115a509f7406 Files : test/src/test/groovy/hudson/model/AbstractProjectTest.groovy Jesse Glick : 6ca99ff8c241769959dec4b31257a54a22e340a6 Files : changelog.html core/src/main/java/hudson/model/listeners/ItemListener.java core/src/main/java/jenkins/model/DirectlyModifiableTopLevelItemGroup.java core/src/main/java/hudson/model/Items.java
            Hide
            scm_issue_link SCM/JIRA link daemon added a comment -

            Code changed in jenkins
            User: Jesse Glick
            Path:
            changelog.html
            core/src/main/java/hudson/model/AbstractProject.java
            test/src/test/groovy/hudson/model/AbstractProjectTest.groovy
            http://jenkins-ci.org/commit/jenkins/cb623640ccd820ad0540efc3b50cc596626e43a2
            Log:
            [FIXED JENKINS-18694] Generalizing fix of JENKINS-18678 to include also rename of parent folders, taking advantage of JENKINS-18028 API.

            Show
            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Jesse Glick Path: changelog.html core/src/main/java/hudson/model/AbstractProject.java test/src/test/groovy/hudson/model/AbstractProjectTest.groovy http://jenkins-ci.org/commit/jenkins/cb623640ccd820ad0540efc3b50cc596626e43a2 Log: [FIXED JENKINS-18694] Generalizing fix of JENKINS-18678 to include also rename of parent folders, taking advantage of JENKINS-18028 API.
            Hide
            scm_issue_link SCM/JIRA link daemon added a comment -

            Code changed in jenkins
            User: Jesse Glick
            Path:
            test/src/main/java/org/jvnet/hudson/test/MockFolder.java
            test/src/test/java/org/jvnet/hudson/test/MockFolderTest.java
            http://jenkins-ci.org/commit/jenkins-test-harness/9d53ebca9d228881bfe8b2c07b431cc81417e4f8
            Log:
            [FIXED JENKINS-18028] Providing a supported way to move an item between folders, firing changes as we go.
            Originally-Committed-As: 9fc87f4a22ef4e32445451f5114fb800b6b73e9e

            Show
            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Jesse Glick Path: test/src/main/java/org/jvnet/hudson/test/MockFolder.java test/src/test/java/org/jvnet/hudson/test/MockFolderTest.java http://jenkins-ci.org/commit/jenkins-test-harness/9d53ebca9d228881bfe8b2c07b431cc81417e4f8 Log: [FIXED JENKINS-18028] Providing a supported way to move an item between folders, firing changes as we go. Originally-Committed-As: 9fc87f4a22ef4e32445451f5114fb800b6b73e9e

              People

              • Assignee:
                jglick Jesse Glick
                Reporter:
                jglick Jesse Glick
              • Votes:
                2 Vote for this issue
                Watchers:
                5 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: