Skip to content

Commit d49e647

Browse files
committed
Fix filters
1 parent 3e454c6 commit d49e647

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

LDK/resources/web/LDK/panel/SingleSubjectFilterType.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,9 @@ Ext4.define('LDK.panel.SingleSubjectFilterType', {
104104
if (!report.subjectFieldName)
105105
return 'This report cannot be used with the selected filter type, because the report does not contain a ' + this.nounSingular + ' Id field';
106106

107+
if (this.subjects.length === 0)
108+
return 'Must enter at least one valid Subject ID.'
109+
107110
return null;
108111
},
109112

@@ -169,7 +172,8 @@ Ext4.define('LDK.panel.SingleSubjectFilterType', {
169172
// results than necessary in some cases, however those results are filtered to match the user input and non-matching
170173
// results are not used.
171174
var filterType = this.caseInsensitive ? LABKEY.Filter.Types.CONTAINS_ONE_OF : LABKEY.Filter.Types.EQUALS_ONE_OF;
172-
this.aliasTable.filterArray = [LABKEY.Filter.create('alias', subjectArray.join(';'), filterType)];
175+
var filterCol = this.aliasTable.aliasColumn ? this.aliasTable.aliasColumn : this.aliasTable.idColumn;
176+
this.aliasTable.filterArray = [LABKEY.Filter.create(filterCol, subjectArray.join(';'), filterType)];
173177
this.aliasTable.columns = this.aliasTable.idColumn + (Ext4.isDefined(this.aliasTable.aliasColumn) ? ',' + this.aliasTable.aliasColumn : '');
174178
},
175179

0 commit comments

Comments
 (0)