Skip to content

Commit

Permalink
https://issues.jenkins-ci.org/browse/JENKINS-22624
Browse files Browse the repository at this point in the history
Fixing compatibility issue.
Fixes #2
  • Loading branch information
taksan committed Apr 15, 2014
1 parent 93977a1 commit d4a73ce
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 5 deletions.
3 changes: 2 additions & 1 deletion pom.xml
Expand Up @@ -3,7 +3,8 @@
<parent>
<groupId>org.jenkins-ci.plugins</groupId>
<artifactId>plugin</artifactId>
<version>1.551</version><!-- which version of Jenkins is this plugin built against? -->
<!-- <version>1.551</version> -->
<version>1.532.1</version>
</parent>

<artifactId>categorized-view</artifactId>
Expand Down
Expand Up @@ -2,19 +2,20 @@

import hudson.Extension;
import hudson.Util;
import hudson.model.TopLevelItem;
import hudson.model.ViewGroup;
import hudson.model.Descriptor;
import hudson.model.Descriptor.FormException;
import hudson.model.ListView;
import hudson.model.TopLevelItem;
import hudson.model.ViewDescriptor;
import hudson.model.ViewGroup;
import hudson.util.CaseInsensitiveComparator;
import hudson.util.DescribableList;
import hudson.util.FormValidation;
import hudson.views.ListViewColumn;

import java.io.IOException;
import java.lang.reflect.Field;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
import java.util.ArrayList;
import java.util.List;
Expand Down Expand Up @@ -95,9 +96,16 @@ public void migrateOldFormat() {

@Override
protected void submit(StaplerRequest req) throws ServletException, FormException, IOException {
forcefullyDisableRecurseBecauseItCausesClassCastExceptionOnJenkins1_532_1(req);
super.submit(req);
categorizationCriteria.rebuildHetero(req, req.getSubmittedForm(), CategorizationCriteria.all(), "categorizationCriteria");
}


public void forcefullyDisableRecurseBecauseItCausesClassCastExceptionOnJenkins1_532_1(
StaplerRequest req) {
req.setAttribute("recurse", false);
}

public DescribableList<CategorizationCriteria, Descriptor<CategorizationCriteria>> getCategorizationCriteria() {
migrateOldFormat();
Expand Down
Expand Up @@ -46,7 +46,7 @@ THE SOFTWARE.
onClick="toggleJobGroupVisibility('${view.getViewName()}','${view.getGroupClassFor(job)}')">
<td>
<span id="handle_${view.getGroupClassFor(job)}">
<img class="icon16x16" src="${rootURL}/images/16x16/collapse.png"/>
<img class="icon16x16" src="${rootURL}/plugin/categorized-view/images/collapse.png"/>
</span>
<script type="text/javascript">
document.observe("dom:loaded", function() {
Expand Down
Expand Up @@ -3,7 +3,7 @@ package hudson.model.View;
t=namespace(lib.CategorizedviewTagLib)
st=namespace("jelly:stapler")

if (items.isEmpty()) {
if (my.groupedItems.isEmpty()) {
if (app.items.size() != 0) {
set("views",my.owner.views);
set("currentView",my);
Expand Down
Binary file added src/main/webapp/images/collapse.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/main/webapp/images/expand.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit d4a73ce

Please sign in to comment.