diff --git a/core/pom.xml b/core/pom.xml index 207c23746d6ec2db69a7f904661cdbccfa609aba..2df7c4190bfd92c4fb09f54031a5b1fda4e4b668 100644 --- a/core/pom.xml +++ b/core/pom.xml @@ -274,7 +274,7 @@ org.kohsuke.stapler stapler - 1.62 + 1.63 org.kohsuke diff --git a/core/src/main/java/hudson/matrix/MatrixRun.java b/core/src/main/java/hudson/matrix/MatrixRun.java index 08fca765f2225c72103bdc8f9b88cfc58b41936d..d8e7bb35d47d2876f56dc718c5cc6b904d023f4c 100644 --- a/core/src/main/java/hudson/matrix/MatrixRun.java +++ b/core/src/main/java/hudson/matrix/MatrixRun.java @@ -31,6 +31,20 @@ public class MatrixRun extends Build { super(project, buildDir); } + public String getUpUrl() { + StaplerRequest req = Stapler.getCurrentRequest(); + if(req!=null) { + List ancs = req.getAncestors(); + for( int i=1; i { super(project, buildDir); } + @Override + public String getUpUrl() { + StaplerRequest req = Stapler.getCurrentRequest(); + if(req!=null) { + List ancs = req.getAncestors(); + for( int i=1; i,R extends Abs return builtOn; } + /** + * Used to render the side panel "Back to project" link. + * + *

+ * In a rare situation where a build can be reached from multiple paths, + * returning different URLs from this method based on situations might + * be desirable. + * + *

+ * If you override this method, you'll most likely also want to override + * {@link #getDisplayName()}. + */ + public String getUpUrl() { + return Functions.getNearestAncestorUrl(Stapler.getCurrentRequest(),getParent())+'/'; + } + /** * List of users who committed a change since the last non-broken build till now. * diff --git a/core/src/main/resources/hudson/model/AbstractBuild/sidepanel.jelly b/core/src/main/resources/hudson/model/AbstractBuild/sidepanel.jelly index 89f8780b8f9153e2a968b7946cdb424c841be12e..5a5143f89f4488745ec888cf7f44e11110c6a731 100644 --- a/core/src/main/resources/hudson/model/AbstractBuild/sidepanel.jelly +++ b/core/src/main/resources/hudson/model/AbstractBuild/sidepanel.jelly @@ -6,7 +6,7 @@ - +