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

Job Disappears from ListView after rename

    Details

    • Similar Issues:

      Description

      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?

        Attachments

          Issue Links

            Activity

            idapperdanman David Ishee created issue -
            Hide
            danielbeck Daniel Beck added a comment -

            Could also be JENKINS-22769 fixed in 1.584.

            Show
            danielbeck Daniel Beck added a comment - Could also be JENKINS-22769 fixed in 1.584.
            Hide
            idapperdanman David Ishee added a comment -

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

            Show
            idapperdanman David Ishee added a comment - I'm an admin user, so hopefully it isn't a permission issue.
            Hide
            danielbeck 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.

            Show
            danielbeck 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.
            danielbeck Daniel Beck made changes -
            Field Original Value New Value
            Component/s nested-view [ 15701 ]
            Hide
            idapperdanman 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)

            Show
            idapperdanman 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)
            Hide
            lvotypkova 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.

            Show
            lvotypkova 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.
            Hide
            lvotypkova 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?

            Show
            lvotypkova 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?
            Hide
            jglick 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).

            Show
            jglick 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).
            jglick Jesse Glick made changes -
            Link This issue is blocking JENKINS-18680 [ JENKINS-18680 ]
            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:
            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.

            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/ListView.java http://jenkins-ci.org/commit/jenkins/9300dab566131e002657bdba606c99ddb10a97c1 Log: [FIXED JENKINS-25276] NestedView extends View implements ViewGroup, so need to search recursively.
            scm_issue_link SCM/JIRA link daemon made changes -
            Status In Progress [ 3 ] Resolved [ 5 ]
            Resolution Fixed [ 1 ]
            jglick Jesse Glick made changes -
            Remote Link This issue links to "PR 1798 (Web Link)" [ 13114 ]
            Hide
            jglick Jesse Glick added a comment -

            Argh, link daemon…

            Show
            jglick Jesse Glick added a comment - Argh, link daemon…
            jglick Jesse Glick made changes -
            Resolution Fixed [ 1 ]
            Status Resolved [ 5 ] Reopened [ 4 ]
            Hide
            danielbeck Daniel Beck added a comment -

            Just don't push branches to jenkinsci.

            Show
            danielbeck Daniel Beck added a comment - Just don't push branches to jenkinsci.
            Hide
            jglick 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.

            Show
            jglick 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.
            Hide
            lvotypkova Lucie Votypkova added a comment -

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

            Show
            lvotypkova Lucie Votypkova added a comment - Thank you, I am going to look at it and test it.
            Hide
            lvotypkova 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!

            Show
            lvotypkova 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!
            rtyler R. Tyler Croy made changes -
            Workflow JNJira [ 159190 ] JNJira + In-Review [ 186236 ]
            Hide
            scm_issue_link 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.

            Show
            scm_issue_link 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 .
            Hide
            scm_issue_link 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

            Show
            scm_issue_link 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
            jglick Jesse Glick made changes -
            Status Reopened [ 4 ] Open [ 1 ]
            jglick Jesse Glick made changes -
            Status Open [ 1 ] In Progress [ 3 ]
            jglick Jesse Glick made changes -
            Status In Progress [ 3 ] In Review [ 10005 ]
            jglick Jesse Glick made changes -
            Labels regression
            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/ListView.java
            http://jenkins-ci.org/commit/jenkins/65d14179bf3e134a4903652d9d8198d160cf6b85
            Log:
            [FIXED JENKINS-25276] NestedView extends View implements ViewGroup, so need to search recursively. (#1798)

            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/ListView.java http://jenkins-ci.org/commit/jenkins/65d14179bf3e134a4903652d9d8198d160cf6b85 Log: [FIXED JENKINS-25276] NestedView extends View implements ViewGroup, so need to search recursively. (#1798)
            Hide
            jglick Jesse Glick added a comment -

            Regression in 1.548 IIRC; finally fixed in 2.87.

            Show
            jglick Jesse Glick added a comment - Regression in 1.548 IIRC; finally fixed in 2.87.
            jglick Jesse Glick made changes -
            Status In Review [ 10005 ] Resolved [ 5 ]
            Resolution Fixed [ 1 ]
            Hide
            sbonami 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?

            Show
            sbonami 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?

              People

              • Assignee:
                jglick Jesse Glick
                Reporter:
                idapperdanman David Ishee
              • Votes:
                0 Vote for this issue
                Watchers:
                6 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: