Skip to content

Commit 15032b2

Browse files
authored
GitHub Issue 867: Cannot filter through a file data field (#7452)
1 parent 1769d9b commit 15032b2

2 files changed

Lines changed: 3 additions & 13 deletions

File tree

api/src/org/labkey/api/data/JsonWriter.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -251,12 +251,13 @@ else if (cinfo.getJdbcType().isNumeric())
251251

252252
props.put("shortCaption", cinfo.getShortLabel());
253253

254-
if (dc instanceof IMultiValuedDisplayColumn || (cinfo.getParentTable() != null && cinfo.getParentTable().getSqlDialect() != null && !cinfo.getParentTable().getSqlDialect().isSortableDataType(cinfo.getSqlTypeName())))
254+
if (PropertyType.FILE_LINK == cinfo.getPropertyType() || dc instanceof IMultiValuedDisplayColumn || (cinfo.getParentTable() != null && cinfo.getParentTable().getSqlDialect() != null && !cinfo.getParentTable().getSqlDialect().isSortableDataType(cinfo.getSqlTypeName())))
255255
{
256+
// Disallow faceted filtering for file columns since the values are often absolute file path
257+
256258
// Disallow faceted filtering when the column is multi-valued, as the value that comes out of the
257259
// database likely has a different delimiter compared to what the user wants to see and therefore
258260
// doesn't work very well.
259-
260261
// Similarly, SQLServer doesn't allow doing a SELECT DISTINCT on TEXT columns, so check the data type (they also can't be sorted)
261262
props.put("facetingBehaviorType", FacetingBehaviorType.ALWAYS_OFF);
262263
}

api/src/org/labkey/api/study/assay/FileLinkDisplayColumn.java

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -463,15 +463,4 @@ public Object getExportCompatibleValue(RenderContext ctx)
463463
return getJsonValue(ctx);
464464
}
465465

466-
@Override
467-
public boolean isFilterable()
468-
{
469-
return false;
470-
}
471-
@Override
472-
public boolean isSortable()
473-
{
474-
return false;
475-
}
476-
477466
}

0 commit comments

Comments
 (0)