diff --git a/core/src/main/java/hudson/model/AbstractItem.java b/core/src/main/java/hudson/model/AbstractItem.java
index 774a2772dc..c7465de865 100644
--- a/core/src/main/java/hudson/model/AbstractItem.java
+++ b/core/src/main/java/hudson/model/AbstractItem.java
@@ -107,7 +107,11 @@ public abstract class AbstractItem extends Actionable implements Item {
}
public final String getUrl() {
- return getParent().getUrl()+getParent().getUrlChildPrefix()+'/'+getName()+'/';
+ return getParent().getUrl()+getShortUrl();
+ }
+
+ public String getShortUrl() {
+ return getParent().getUrlChildPrefix()+'/'+getName()+'/';
}
/**
diff --git a/core/src/main/java/hudson/model/Item.java b/core/src/main/java/hudson/model/Item.java
index c2a9c2b189..ba9faa1210 100644
--- a/core/src/main/java/hudson/model/Item.java
+++ b/core/src/main/java/hudson/model/Item.java
@@ -69,12 +69,18 @@ public interface Item extends PersistenceRoot {
String getFullName();
/**
- * Returns the URL of this project relative to the context root of the application.
+ * Returns the URL of this item relative to the context root of the application.
*
* @see AbstractItem#getUrl() for how to implement this.
*/
String getUrl();
+ /**
+ * Returns the URL of this item relative to the parent {@link ItemGroup}.
+ * @see AbstractItem#getShortUrl() for how to implement this.
+ */
+ String getShortUrl();
+
/**
* Called right after when a {@link Item} is loaded from disk.
* This is an opporunity to do a post load processing.
diff --git a/core/src/main/resources/lib/hudson/projectView.jelly b/core/src/main/resources/lib/hudson/projectView.jelly
index cce516f11a..7d808d104d 100644
--- a/core/src/main/resources/lib/hudson/projectView.jelly
+++ b/core/src/main/resources/lib/hudson/projectView.jelly
@@ -47,7 +47,7 @@