Skip to content
Permalink
Browse files

Merge pull request #11 from opencloud/JENKINS-8276-fix-job-filters

[JENKINS-8276] Moved method that tests for job filter extenstions fro…
  • Loading branch information...
tbingaman committed Oct 5, 2015
2 parents 3769737 + 7a9f98f commit 7e82f2774b5d93f9078078623e0a965ecdb73818
@@ -104,8 +104,12 @@ public String getIncludeRegex() {
return jobFilters;
}

/**
* @deprecated use {@link SectionedViewSectionDescriptor#hasJobFilterExtensions()} instead
*/
@Deprecated
public boolean hasJobFilterExtensions() {
return !ViewJobFilter.all().isEmpty();
return getDescriptor().hasJobFilterExtensions();
}

public Width getWidth() {
@@ -55,6 +55,10 @@ protected SectionedViewSectionDescriptor(Class<? extends SectionedViewSection> c
protected SectionedViewSectionDescriptor() {
}

public boolean hasJobFilterExtensions() {
return !ViewJobFilter.all().isEmpty();
}

@Override
public SectionedViewSection newInstance(StaplerRequest req, JSONObject formData) throws FormException {
SectionedViewSection section = (SectionedViewSection)req.bindJSON(getClass().getDeclaringClass(), formData);
@@ -49,7 +49,7 @@ THE SOFTWARE.
</f:entry>
</f:optionalBlock>

<j:if test="${instance.hasJobFilterExtensions()}">
<j:if test="${descriptor.hasJobFilterExtensions()}">
<j:invokeStatic var="allJobFilters" className="hudson.views.ViewJobFilter" method="all"/>
<f:block>
<f:hetero-list name="jobFilters" hasHeader="true"
@@ -43,7 +43,7 @@ THE SOFTWARE.
</j:forEach>
</f:entry>

<j:if test="${instance.hasJobFilterExtensions()}">
<j:if test="${descriptor.hasJobFilterExtensions()}">
<j:invokeStatic var="allJobFilters" className="hudson.views.ViewJobFilter" method="all"/>
<f:block>
<f:hetero-list name="jobFilters" hasHeader="true"

0 comments on commit 7e82f27

Please sign in to comment.
You can’t perform that action at this time.