Skip to content
Permalink
Browse files
[FIXED JENKINS-23375] Incorrect redirect after deleting a folder.
(cherry picked from commit 34f885b)

Conflicts:
	changelog.html
  • Loading branch information
jglick authored and olivergondza committed Jul 2, 2014
1 parent 0ce7ad2 commit 47203a9235c05ba787423a05372de07cb8e20e98
Showing with 2 additions and 1 deletion.
  1. +1 −1 core/src/main/java/hudson/model/AbstractItem.java
  2. +1 −0 test/src/test/groovy/hudson/model/AbstractProjectTest.groovy
@@ -501,7 +501,7 @@ public void doDoDelete( StaplerRequest req, StaplerResponse rsp ) throws IOExcep
if (a instanceof View) {
url = ((View) a).getUrl();
break;
} else if (a instanceof ViewGroup) {
} else if (a instanceof ViewGroup && a != this) {
url = ((ViewGroup) a).getUrl();
break;
}
@@ -372,6 +372,7 @@ public class AbstractProjectTest extends HudsonTestCase {
assert "job/d/" == deleteRedirectTarget("job/d/job/j3");
assert "job/d/view/v2/" == deleteRedirectTarget("job/d/view/v2/job/j4");
assert "view/v1/job/d/" == deleteRedirectTarget("view/v1/job/d/job/j5");
assert "view/v1/" == deleteRedirectTarget("view/v1/job/d"); // JENKINS-23375
}

private String deleteRedirectTarget(String job) {

0 comments on commit 47203a9

Please sign in to comment.