Skip to content
Permalink
Browse files
[FIXED JENKINS-23375] Incorrect redirect after deleting a folder.
  • Loading branch information
jglick committed Jun 9, 2014
1 parent 7423d30 commit 34f885b73f3a054c6de3e25f47b0e464d9a4df3f
Showing with 5 additions and 1 deletion.
  1. +3 −0 changelog.html
  2. +1 −1 core/src/main/java/hudson/model/AbstractItem.java
  3. +1 −0 test/src/test/groovy/hudson/model/AbstractProjectTest.groovy
@@ -61,6 +61,9 @@
<li class=rfe>
Support the range notation for pagination in API
(<a href="https://issues.jenkins-ci.org/browse/JENKINS-23228">issue 23228</a>)
<li class=bug>
Incorrect redirect after deleting a folder.
(<a href="https://issues.jenkins-ci.org/browse/JENKINS-23375">issue 23375</a>)
<li class=rfe>
API changes allowing new job types to use SCM plugins.
(<a href="https://issues.jenkins-ci.org/browse/JENKINS-23365">issue 23365</a>)
@@ -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;
}
@@ -381,6 +381,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 34f885b

Please sign in to comment.