Skip to content

Commit

Permalink
[JENKINS-21174] Broken link in menu on the job page before the first …
Browse files Browse the repository at this point in the history
…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 bcbe5da
Showing 1 changed file with 3 additions and 0 deletions.
Expand Up @@ -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("..");
}
}

Expand Down

0 comments on commit bcbe5da

Please sign in to comment.