Commit 8f33f6d2 authored by Matija Obreza's avatar Matija Obreza
Browse files

Fixed #38 - Allow filter on SAMPSTAT = null

parent 0abdbf0c
......@@ -125,7 +125,7 @@ public class DirectMysqlQuery {
}
if (hasFilter(filters, FilterConstants.STORAGE)) {
innerJoin("accessionstorage", "storage", "storage.accessionId=a.id");
outerJoin("accessionstorage", "storage", "storage.accessionId=a.id");
}
return this;
......@@ -133,7 +133,7 @@ public class DirectMysqlQuery {
static boolean hasFilter(AppliedFilters filters, String filterName) {
final AppliedFilter f = filters.get(filterName);
return f != null && f.getValues().size() > 0;
return f != null && (f.getWithNull() || f.getValues().size() > 0);
}
protected DirectMysqlQuery filter(AppliedFilters filters, MethodResolver methodResolver) {
......
......@@ -58,6 +58,7 @@
</label>
</div>
</c:forEach>
<div><label><input type="checkbox" class="filter-bool" i-key="<c:out value="${filter.key}" />" id="<c:out value="${normalizedKey}" />" value="null"><spring:message code="boolean.null"/></label></div>
</div>
</c:when>
<c:when test="${filter.filterType=='AUTOCOMPLETE'}">
......
......@@ -134,6 +134,7 @@
</label>
</div>
</c:forEach>
<div><label><input type="checkbox" ${fn:contains(filters[appliedFilter.key], 'null')?'checked':''} class="filter-bool" i-key="<c:out value="${filter.key}" />" id="<c:out value="${normalizedKey}" />" value="null"><spring:message code="boolean.null"/></label></div>
</div>
</c:when>
<c:when test="${filter.filterType=='AUTOCOMPLETE'}">
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment