Navigation Menu

Skip to content

Commit

Permalink
[FIXED JENKINS-23375] Incorrect redirect after deleting a folder.
Browse files Browse the repository at this point in the history
  • Loading branch information
jglick committed Jun 9, 2014
1 parent 7423d30 commit 34f885b
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 1 deletion.
3 changes: 3 additions & 0 deletions changelog.html
Expand Up @@ -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>)
Expand Down
2 changes: 1 addition & 1 deletion core/src/main/java/hudson/model/AbstractItem.java
Expand Up @@ -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;
}
Expand Down
Expand Up @@ -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) {
Expand Down

0 comments on commit 34f885b

Please sign in to comment.