diff --git a/src/main/java/hudson/plugins/promoted_builds/PromotionTargetAction.java b/src/main/java/hudson/plugins/promoted_builds/PromotionTargetAction.java index 1d5f0061..8c0783e1 100644 --- a/src/main/java/hudson/plugins/promoted_builds/PromotionTargetAction.java +++ b/src/main/java/hudson/plugins/promoted_builds/PromotionTargetAction.java @@ -15,7 +15,7 @@ public class PromotionTargetAction extends InvisibleAction { private final int number; public PromotionTargetAction(AbstractBuild build) { - jobName = build.getParent().getFullName(); + jobName = build.getProject().getFullName(); number = build.getNumber(); } @@ -26,12 +26,10 @@ public AbstractBuild resolve() { } public AbstractBuild resolve(PromotionProcess parent) { - AbstractProject j = parent.getOwner(); - if (j==null) return null; - return j.getBuildByNumber(number); + return resolve(); } public AbstractBuild resolve(Promotion parent) { - return resolve(parent.getParent()); + return resolve(); } }