Skip to content
Permalink
Browse files
[JENKINS-21174] Broken link in menu on the job page before the first …
…build

- If a job is created and no build exists yet, clicking on the link in the menu will redirect the user to an empty page.
- Fixed to redirect the user to the previously displayed job page in such case.
- A new page with an info message would be better, but this is much simpler and good enough for such corner case.
  • Loading branch information
mixalturek committed Dec 29, 2013
1 parent 284e6ea commit bcbe5dabc05983dcfc93411b0acc72a60316b0f5
Showing 1 changed file with 3 additions and 0 deletions.
@@ -53,6 +53,9 @@ public void doIndex(final StaplerRequest request, final StaplerResponse response
AbstractBuild<?, ?> build = getLastFinishedBuild();
if (build != null) {
response.sendRedirect2(String.format("../%d/%s", build.getNumber(), SloccountBuildAction.URL_NAME));
}else{
// Click to the link in menu on the job page before the first build
response.sendRedirect2("..");
}
}

0 comments on commit bcbe5da

Please sign in to comment.