I'm still seeing jobs disappear from a ListView after renaming. JENKINS-23893 says this was fixed, but was the fix in 1.565.3 or in the next release?

      I'm also using the NestedViews plugin. Would that make a difference?

          [JENKINS-25276] Job Disappears from ListView after rename

          Daniel Beck added a comment -

          Could also be JENKINS-22769 fixed in 1.584.

          Daniel Beck added a comment - Could also be JENKINS-22769 fixed in 1.584.

          David Ishee added a comment -

          I'm an admin user, so hopefully it isn't a permission issue.

          David Ishee added a comment - I'm an admin user, so hopefully it isn't a permission issue.

          Daniel Beck added a comment -

          Are all the affected List Views within Nested Views? Are any List Views within Nested Views not affected?

          It's only relevant if a project is included explicitly by name, regexp and filters don't count.

          Daniel Beck added a comment - Are all the affected List Views within Nested Views? Are any List Views within Nested Views not affected? It's only relevant if a project is included explicitly by name, regexp and filters don't count.

          David Ishee added a comment -

          We use Nested Views heavily so I've only noticed it there. When it disappears, it was because it was included using the checkboxes. (not regexps)

          David Ishee added a comment - We use Nested Views heavily so I've only noticed it there. When it disappears, it was because it was included using the checkboxes. (not regexps)

          This issue is caused by changes in core. Now onRenameJob method is not used. I am looking on this issue because it has big impact on our Jenkins instance, almost all our root views (views owned by Jenkins instance) are NestedView, so almost all our views are affected by this issue. I will comment when I am sure exactly where is the problem in code.

          Lucie Votypkova added a comment - This issue is caused by changes in core. Now onRenameJob method is not used. I am looking on this issue because it has big impact on our Jenkins instance, almost all our root views (views owned by Jenkins instance) are NestedView, so almost all our views are affected by this issue. I will comment when I am sure exactly where is the problem in code.

          Hi,
          I checked a code and the problem is that NestedView is not item but only ViewGroup (in comparing with Folder plugin which does the similar).
          Now renamed job procedure is delegated on ItemListener of ListView for all instances of ListView and method onJobRename is deprecated and do nothing.
          https://github.com/jenkinsci/jenkins/blob/master/core/src/main/java/hudson/model/View.java#L588
          https://github.com/jenkinsci/jenkins/blob/master/core/src/main/java/hudson/model/ListView.java#L434
          https://github.com/jenkinsci/jenkins/blob/master/core/src/main/java/hudson/model/ListView.java#L449

          So unfortunately the old one way stopped work due to empty onJobRename method and new one does not work because NestedView is not Item.

          I am not sure what I should change - the NestedView to meet requirements for working of new way, or the listener of ListView to included even GroupView which is not Item. Someone any suggestion?

          Lucie Votypkova added a comment - Hi, I checked a code and the problem is that NestedView is not item but only ViewGroup (in comparing with Folder plugin which does the similar). Now renamed job procedure is delegated on ItemListener of ListView for all instances of ListView and method onJobRename is deprecated and do nothing. https://github.com/jenkinsci/jenkins/blob/master/core/src/main/java/hudson/model/View.java#L588 https://github.com/jenkinsci/jenkins/blob/master/core/src/main/java/hudson/model/ListView.java#L434 https://github.com/jenkinsci/jenkins/blob/master/core/src/main/java/hudson/model/ListView.java#L449 So unfortunately the old one way stopped work due to empty onJobRename method and new one does not work because NestedView is not Item. I am not sure what I should change - the NestedView to meet requirements for working of new way, or the listener of ListView to included even GroupView which is not Item. Someone any suggestion?

          Jesse Glick added a comment -

          Jenkins.onRenamed still calls View.onJobRenamed for compatibility, so NestedView could still implement it. But this will only work for simple renames at top level. It would be better for the nested view to be included in the ListView listener (both for location change and delete).

          Jesse Glick added a comment - Jenkins.onRenamed still calls View.onJobRenamed for compatibility, so NestedView could still implement it. But this will only work for simple renames at top level. It would be better for the nested view to be included in the ListView listener (both for location change and delete).

          Code changed in jenkins
          User: Jesse Glick
          Path:
          core/src/main/java/hudson/model/ListView.java
          http://jenkins-ci.org/commit/jenkins/9300dab566131e002657bdba606c99ddb10a97c1
          Log:
          [FIXED JENKINS-25276] NestedView extends View implements ViewGroup, so need to search recursively.

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Jesse Glick Path: core/src/main/java/hudson/model/ListView.java http://jenkins-ci.org/commit/jenkins/9300dab566131e002657bdba606c99ddb10a97c1 Log: [FIXED JENKINS-25276] NestedView extends View implements ViewGroup, so need to search recursively.

          Jesse Glick added a comment -

          Argh, link daemon…

          Jesse Glick added a comment - Argh, link daemon…

          Daniel Beck added a comment -

          Just don't push branches to jenkinsci.

          Daniel Beck added a comment - Just don't push branches to jenkinsci.

          Jesse Glick added a comment -

          Just don't push branches to jenkinsci.

          In this case I needed to, in order to offer it up for collaboration.

          Jesse Glick added a comment - Just don't push branches to jenkinsci. In this case I needed to, in order to offer it up for collaboration.

          Thank you, I am going to look at it and test it.

          Lucie Votypkova added a comment - Thank you, I am going to look at it and test it.

          Hi, I tested it manually and it work well. I created test for it https://github.com/jenkinsci/nested-view-plugin/pull/22. Thanks a lot!

          Lucie Votypkova added a comment - Hi, I tested it manually and it work well. I created test for it https://github.com/jenkinsci/nested-view-plugin/pull/22 . Thanks a lot!

          Code changed in jenkins
          User: lvotypko
          Path:
          src/test/java/hudson/plugins/nested_view/NestedViewTest.java
          http://jenkins-ci.org/commit/nested-view-plugin/b8bd73baf8182d4744bb69704282f7addc20b56c
          Log:
          Test for JENKINS-25276.

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: lvotypko Path: src/test/java/hudson/plugins/nested_view/NestedViewTest.java http://jenkins-ci.org/commit/nested-view-plugin/b8bd73baf8182d4744bb69704282f7addc20b56c Log: Test for JENKINS-25276 .

          Code changed in jenkins
          User: Oliver Gondža
          Path:
          src/test/java/hudson/plugins/nested_view/NestedViewTest.java
          http://jenkins-ci.org/commit/nested-view-plugin/8a1ae9d6dd4385c11177bff6211fd841c9a38dda
          Log:
          Merge pull request #22 from lvotypko/master

          Test for JENKINS-25276.

          Compare: https://github.com/jenkinsci/nested-view-plugin/compare/55ef1b441dfd...8a1ae9d6dd43

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Oliver Gondža Path: src/test/java/hudson/plugins/nested_view/NestedViewTest.java http://jenkins-ci.org/commit/nested-view-plugin/8a1ae9d6dd4385c11177bff6211fd841c9a38dda Log: Merge pull request #22 from lvotypko/master Test for JENKINS-25276 . Compare: https://github.com/jenkinsci/nested-view-plugin/compare/55ef1b441dfd...8a1ae9d6dd43

          Code changed in jenkins
          User: Jesse Glick
          Path:
          core/src/main/java/hudson/model/ListView.java
          http://jenkins-ci.org/commit/jenkins/65d14179bf3e134a4903652d9d8198d160cf6b85
          Log:
          [FIXED JENKINS-25276] NestedView extends View implements ViewGroup, so need to search recursively. (#1798)

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Jesse Glick Path: core/src/main/java/hudson/model/ListView.java http://jenkins-ci.org/commit/jenkins/65d14179bf3e134a4903652d9d8198d160cf6b85 Log: [FIXED JENKINS-25276] NestedView extends View implements ViewGroup, so need to search recursively. (#1798)

          Jesse Glick added a comment -

          Regression in 1.548 IIRC; finally fixed in 2.87.

          Jesse Glick added a comment - Regression in 1.548 IIRC; finally fixed in 2.87.

          I have this problem using Jenkins ver. 2.89.4. Can someone please confirm on which version this was resolved?

          Sebastien Bonami added a comment - I have this problem using Jenkins ver. 2.89.4. Can someone please confirm on which version this was resolved?

            jglick Jesse Glick
            idapperdanman David Ishee
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: