New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fixed JENKINS-21527 issue #24

Merged
merged 1 commit into from Feb 26, 2014
Merged
Changes from all commits
Commits
File filter...
Filter file types
Jump to…
Jump to file or symbol
Failed to load files and symbols.
+19 −3
Diff settings

Always

Just for now

@@ -299,10 +299,26 @@ private String getPendingStatus() {
public PipelineBuild getUpstreamPipelineBuild() {
@SuppressWarnings("rawtypes")
final List<AbstractProject> upstreamProjects = getProject().getUpstreamProjects();
final AbstractProject<?, ?> previousProject;
AbstractProject<?, ?> previousProject = null;
String upstreamBuildName;
final PipelineBuild previousPB = new PipelineBuild();
if (upstreamProjects.size() > 0) {
previousProject = upstreamProjects.get(0);
if (this.upstreamBuild != null) {
upstreamBuildName = this.upstreamBuild.getProject().getName();
} else {
upstreamBuildName = "";
}
if (upstreamProjects.size() > 0) {
if (isManualTrigger()) {
for (AbstractProject upstreamProject : upstreamProjects) {
if (upstreamProject.getName().equals(upstreamBuildName)) {
previousProject = upstreamProject;
break;
}
}
}
if (previousProject == null) {
previousProject = upstreamProjects.get(0);
}
previousPB.setCurrentBuild(this.getUpstreamBuild());
previousPB.setProject(previousProject);
}
ProTip! Use n and p to navigate between commits in a pull request.