Use of a Boolean Field in Views Filter Criteria. If "default values will be used" of a field when adding field to content type. Results in Views Filter Criteria Options as blank options, but you can still select the blank values and works as expected.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

serundeputy’s picture

This did not happen on a minimal install of drupal 7.32-dev so fundamentally I don't think it is a views issue. I did see it on a drupal 7 default install.

this patch fixed it for me, but I further investigation of the cause is needed and the patch belongs in that module since views respected boolean fields on a default install.

 /**
      **  check to see if the filter is empty string.
      **/
      $i = 0;
      foreach ($options as &$o) {
        if ($o == '') {
          $o = (string) $i;
          $i++;
        }
      }
      unset($o);
serundeputy’s picture

Status: Active » Needs review

Status: Needs review » Needs work

The last submitted patch, 1: boolean-views-filter-2214889-1.patch, failed testing.

MustangGB’s picture

Category: Task » Feature request