More elegant way of doing job renames

This issue is archived. You can view it, but you can't modify it. Learn more

XMLWordPrintable

    • Type: Improvement
    • Resolution: Fixed
    • Priority: Major
    • Component/s: core
    • Environment:
      Platform: All, OS: All

      Currently the BuildTrigger is the only Publisher that gets called when a job is
      renamed.

      The snippet of code that seems to do that is (Job.java line 340):
      // update BuildTrigger of other projects that point to this object.
      // can't we generalize this?
      for( Project p : parent.getProjects() ) {
      BuildTrigger t = (BuildTrigger)
      p.getPublishers().get(BuildTrigger.DESCRIPTOR);
      if(t!=null)

      { if(t.onJobRenamed(oldName,newName)) p.save(); }

      }

      How about creating a notification interface and alerting all plugins
      implementing this interface when a job is renamed? This will allow people
      writing plugins to also make use of this nice functionality.

            Assignee:
            Unassigned
            Reporter:
            malanj
            Archiver:
            Jenkins Service Account

              Created:
              Updated:
              Resolved:
              Archived: