diff --git a/core/classes/BugFilterQuery.class.php b/core/classes/BugFilterQuery.class.php index 440592dafc..5fab877263 100644 --- a/core/classes/BugFilterQuery.class.php +++ b/core/classes/BugFilterQuery.class.php @@ -1324,18 +1324,18 @@ protected function build_prop_custom_fields() { } $t_field = $this->filter['custom_fields'][$t_cfid]; - if( filter_field_is_any( $t_field ) ) { - # Ignore all custom filters that are not set, or that are set to '' or "any" - continue; - } $t_custom_where_clause = ''; $t_def = custom_field_get_definition( $t_cfid ); - # skip date custom fields with value of "any" + # Skip date custom fields with value of "any", these have a special array format if( $t_def['type'] == CUSTOM_FIELD_TYPE_DATE && $t_field[0] == CUSTOM_FIELD_DATE_ANY ) { continue; } + # Ignore custom fields that are not set, or that are set to '' or "any" + if( filter_field_is_any( $t_field ) ) { + continue; + } $t_table_name = $this->helper_table_alias_for_cf( $t_def ); if( !$t_table_name ) {