You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[JENKINS-891] More elegant way of doing job renames #13839
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.
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.
Activity
jenkins-infra-bot commentedon Oct 4, 2007
Raw content of original comment:
Wrong component: this issue has no relevance for the tasks plugin.
jenkins-infra-bot commentedon Oct 9, 2007
Raw content of original comment:
Implemented in 1.146. I added ItemListener.onRenamed(...)