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

View.onJobRenamed should be deprecated

    XMLWordPrintable

    Details

    • Similar Issues:

      Description

      View.onJobRenamed does not work well with item groups. Jenkins could instead include a single ItemListener which told views when a job was renamed, relieving the code doing the rename (such as in Jenkins or Folder) from having to call this method. (Same for deletions.) That would also allow views to be notified when a job in a subfolder (which ListView now supports) is renamed, which is currently not possible. Perhaps onJobRenamed should be deprecated, and a new callback introduced which can handle jobs in subfolders and also cross-folder moves.

        Attachments

          Issue Links

            Activity

            jglick Jesse Glick created issue -
            jglick Jesse Glick made changes -
            Field Original Value New Value
            Link This issue is related to JENKINS-18028 [ JENKINS-18028 ]
            jglick Jesse Glick made changes -
            Link This issue is duplicated by JENKINS-21075 [ JENKINS-21075 ]
            jglick Jesse Glick made changes -
            Labels api folders folders lts-candidate
            jglick Jesse Glick made changes -
            Labels folders lts-candidate api folders lts-candidate
            Hide
            danielbeck Daniel Beck added a comment - - edited

            Also affected are users' views ("My Views") when renaming top-level (or any level really) jobs because they don't get notified either.

            Show
            danielbeck Daniel Beck added a comment - - edited Also affected are users' views ("My Views") when renaming top-level (or any level really) jobs because they don't get notified either.
            jglick Jesse Glick made changes -
            Assignee Jesse Glick [ jglick ]
            jglick Jesse Glick made changes -
            Status Open [ 1 ] In Progress [ 3 ]
            Hide
            scm_issue_link SCM/JIRA link daemon added a comment -

            Code changed in jenkins
            User: Jesse Glick
            Path:
            src/main/java/com/cloudbees/hudson/plugins/folder/Folder.java
            http://jenkins-ci.org/commit/cloudbees-folder-plugin/e00d2b7eb16de5b554b27fba680eb1d8dbfec90f
            Log:
            JENKINS-18680 Comments.

            Show
            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Jesse Glick Path: src/main/java/com/cloudbees/hudson/plugins/folder/Folder.java http://jenkins-ci.org/commit/cloudbees-folder-plugin/e00d2b7eb16de5b554b27fba680eb1d8dbfec90f Log: JENKINS-18680 Comments.
            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/AllView.java
            core/src/main/java/hudson/model/ItemGroup.java
            core/src/main/java/hudson/model/ListView.java
            core/src/main/java/hudson/model/MyView.java
            core/src/main/java/hudson/model/ProxyView.java
            core/src/main/java/hudson/model/TreeView.java
            core/src/main/java/hudson/model/View.java
            core/src/main/java/jenkins/model/Jenkins.java
            core/src/test/java/hudson/model/ViewTest.java
            test/src/main/java/org/jvnet/hudson/test/MockFolder.java
            test/src/test/java/hudson/model/ListViewTest.java
            http://jenkins-ci.org/commit/jenkins/6d3c2e0d849dd76b6507daca1cc910f75418e941
            Log:
            [FIXED JENKINS-18680] Update members of a ListView using a regular listener, not View.onJobRenamed which does not work with folders.

            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/AllView.java core/src/main/java/hudson/model/ItemGroup.java core/src/main/java/hudson/model/ListView.java core/src/main/java/hudson/model/MyView.java core/src/main/java/hudson/model/ProxyView.java core/src/main/java/hudson/model/TreeView.java core/src/main/java/hudson/model/View.java core/src/main/java/jenkins/model/Jenkins.java core/src/test/java/hudson/model/ViewTest.java test/src/main/java/org/jvnet/hudson/test/MockFolder.java test/src/test/java/hudson/model/ListViewTest.java http://jenkins-ci.org/commit/jenkins/6d3c2e0d849dd76b6507daca1cc910f75418e941 Log: [FIXED JENKINS-18680] Update members of a ListView using a regular listener, not View.onJobRenamed which does not work with folders.
            scm_issue_link SCM/JIRA link daemon made changes -
            Status In Progress [ 3 ] Resolved [ 5 ]
            Resolution Fixed [ 1 ]
            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-18680] Update members of a ListView using a regular listener, not View.onJobRenamed which does not work with folders. (Revision 6d3c2e0d849dd76b6507daca1cc910f75418e941)
            [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 : 6d3c2e0d849dd76b6507daca1cc910f75418e941
            Files :

            • core/src/main/java/hudson/model/ListView.java
            • core/src/test/java/hudson/model/ViewTest.java
            • test/src/test/java/hudson/model/ListViewTest.java
            • core/src/main/java/hudson/model/ProxyView.java
            • core/src/main/java/hudson/model/View.java
            • core/src/main/java/hudson/model/TreeView.java
            • core/src/main/java/hudson/model/ItemGroup.java
            • core/src/main/java/jenkins/model/Jenkins.java
            • core/src/main/java/hudson/model/MyView.java
            • core/src/main/java/hudson/model/AllView.java
            • test/src/main/java/org/jvnet/hudson/test/MockFolder.java

            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-18680] Update members of a ListView using a regular listener, not View.onJobRenamed which does not work with folders. (Revision 6d3c2e0d849dd76b6507daca1cc910f75418e941) [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 : 6d3c2e0d849dd76b6507daca1cc910f75418e941 Files : core/src/main/java/hudson/model/ListView.java core/src/test/java/hudson/model/ViewTest.java test/src/test/java/hudson/model/ListViewTest.java core/src/main/java/hudson/model/ProxyView.java core/src/main/java/hudson/model/View.java core/src/main/java/hudson/model/TreeView.java core/src/main/java/hudson/model/ItemGroup.java core/src/main/java/jenkins/model/Jenkins.java core/src/main/java/hudson/model/MyView.java core/src/main/java/hudson/model/AllView.java test/src/main/java/org/jvnet/hudson/test/MockFolder.java 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
            jglick Jesse Glick made changes -
            Labels api folders lts-candidate api folders
            jglick Jesse Glick made changes -
            Link This issue depends on JENKINS-22769 [ JENKINS-22769 ]
            jglick Jesse Glick made changes -
            Link This issue depends on JENKINS-25276 [ JENKINS-25276 ]
            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
            http://jenkins-ci.org/commit/jenkins-test-harness/511bd4998da93f4ec224273489cb716b6ad57f7f
            Log:
            [FIXED JENKINS-18680] Update members of a ListView using a regular listener, not View.onJobRenamed which does not work with folders.
            Originally-Committed-As: 6d3c2e0d849dd76b6507daca1cc910f75418e941

            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 http://jenkins-ci.org/commit/jenkins-test-harness/511bd4998da93f4ec224273489cb716b6ad57f7f Log: [FIXED JENKINS-18680] Update members of a ListView using a regular listener, not View.onJobRenamed which does not work with folders. Originally-Committed-As: 6d3c2e0d849dd76b6507daca1cc910f75418e941
            rtyler R. Tyler Croy made changes -
            Workflow JNJira [ 150028 ] JNJira + In-Review [ 193389 ]

              People

              • Assignee:
                jglick Jesse Glick
                Reporter:
                jglick Jesse Glick
              • Votes:
                0 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: