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

More elegant way of doing job renames

XMLWordPrintable

    • Icon: Improvement Improvement
    • Resolution: Fixed
    • Icon: Major Major
    • core
    • None
    • 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.

            Unassigned Unassigned
            malanj malanj
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: