aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorakozak2011-11-25 02:41:43 (EST)
committerWinston Prakash2011-12-01 20:47:33 (EST)
commitc182cf377273ec43e949fa5580488fed7edaa301 (patch)
tree52c4fd93817c8e993f7b62da5a7448c7553b7f9f
parenta24c5d7c69262484dc03d9bb6cf373de7fb1a4cc (diff)
downloadorg.eclipse.hudson.core-c182cf377273ec43e949fa5580488fed7edaa301.zip
org.eclipse.hudson.core-c182cf377273ec43e949fa5580488fed7edaa301.tar.gz
org.eclipse.hudson.core-c182cf377273ec43e949fa5580488fed7edaa301.tar.bz2
Reset triggers while removing cascading project parent
Signed-off-by: Winston Prakash <winston.prakash@gmail.com>
-rw-r--r--hudson-core/src/main/java/hudson/model/Job.java5
1 files changed, 5 insertions, 0 deletions
diff --git a/hudson-core/src/main/java/hudson/model/Job.java b/hudson-core/src/main/java/hudson/model/Job.java
index 849bf1f..51e9e1c 100644
--- a/hudson-core/src/main/java/hudson/model/Job.java
+++ b/hudson-core/src/main/java/hudson/model/Job.java
@@ -89,6 +89,7 @@ import net.sf.json.JSONObject;
import org.eclipse.hudson.api.model.IJob;
import org.eclipse.hudson.api.model.IProjectProperty;
import org.eclipse.hudson.api.model.project.property.ExternalProjectProperty;
+import org.eclipse.hudson.api.model.project.property.TriggerProjectProperty;
import org.jvnet.localizer.Localizable;
import org.kohsuke.args4j.Argument;
import org.kohsuke.args4j.CmdLineException;
@@ -1616,6 +1617,10 @@ public abstract class Job<JobT extends Job<JobT, RunT>, RunT extends Run<JobT, R
this.cascadingProject = null;
this.cascadingProjectName = null;
for (IProjectProperty property : jobProperties.values()) {
+ if (property instanceof TriggerProjectProperty && !property.isOverridden() && property.getValue() != null) {
+ ((TriggerProjectProperty) property).getValue().stop();
+ property.resetValue();
+ }
property.setOverridden(false);
}
}