summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorakozak2011-11-25 02:41:43 (EST)
committer Winston Prakash2011-12-01 20:47:33 (EST)
commit3dfe1bd15a791317291f81eb9b5e989670c31257 (patch)
treebd8e728ee3bd963c889d49bae1e38506f0b945dd
parent11defcee7c051c5f4c7d5a2694a07e9a32e5857a (diff)
downloadorg.eclipse.hudson.core-3dfe1bd15a791317291f81eb9b5e989670c31257.zip
org.eclipse.hudson.core-3dfe1bd15a791317291f81eb9b5e989670c31257.tar.gz
org.eclipse.hudson.core-3dfe1bd15a791317291f81eb9b5e989670c31257.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);
}
}