Skip to content

Commit

Permalink
Properly check for date custom fields
Browse files Browse the repository at this point in the history
Filter value "any" for date custom fields needs a special check,
different from the generic for other filter values.
  • Loading branch information
cproensa authored and dregad committed Mar 5, 2018
1 parent 6f1e261 commit d1d95ba
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions core/classes/BugFilterQuery.class.php
Expand Up @@ -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 ) {
Expand Down

0 comments on commit d1d95ba

Please sign in to comment.