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

New AbstractItem renaming template broken if URL is not defined in sidepanel.jelly

    Details

    • Type: Bug
    • Status: Resolved (View Workflow)
    • Priority: Minor
    • Resolution: Fixed
    • Component/s: core
    • Labels:
    • Environment:
      Jenkins Core >= 2.110
    • Similar Issues:
    • Released As:
      Jenkins 2.130

      Description

      The Jelly template for RenameAction added in jenkinsci/jenkins#3289 is incorrect for items who do not define a variable in the template that includes the rename action named url that contains the item's URL (Generally this is items that don't inherit from AbstractProject). This was found when we tried to make folders use the new renaming method and the URL created for the action was http(s)://$JENKINS/confirm-rename, when it should have been http(s)://$JENKINS/job/$FOLDER/confirm-rename.

      In particular, the url variable used in RenameAction/action.jelly is defined in AbstractProject/sidepanel.jelly, but not all AbstractItem subclasses extend AbstractProject.

      This is a regression for any Job types extending Job but not AbstractProject where Job#isNameEditable returns true and where a url variable is not set in the template that includes the Job's actions, but I don't know how common that is. I thought it might affect Pipeline since WorkflowJob does not extend AbstractProject, but fortunately url is defined in WorkflowJob/sidepanel.jelly so it works fine.

      To fix this we can copy the code to generate the URL into RenameAction/action.jelly.

        Attachments

          Issue Links

            Activity

            dnusbaum Devin Nusbaum created issue -
            dnusbaum Devin Nusbaum made changes -
            Field Original Value New Value
            Status Open [ 1 ] In Progress [ 3 ]
            dnusbaum Devin Nusbaum made changes -
            Status In Progress [ 3 ] In Review [ 10005 ]
            dnusbaum Devin Nusbaum made changes -
            Remote Link This issue links to "jenkinsci/jenkins#3523 (Web Link)" [ 21104 ]
            dnusbaum Devin Nusbaum made changes -
            Status In Review [ 10005 ] Resolved [ 5 ]
            Resolution Fixed [ 1 ]
            oleg_nenashev Oleg Nenashev made changes -
            Released As 2.130
            oleg_nenashev Oleg Nenashev made changes -
            Released As 2.130 Jenkins 2.130

              People

              • Assignee:
                dnusbaum Devin Nusbaum
                Reporter:
                dnusbaum Devin Nusbaum
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: