This is just a copy/paste from: http://drupal.org/node/1246578#comment-6104694 posted by miltonsp

The 'Convert to boolean' plug-in does not work out-of-the-box in Drupal 7.
Here is a small patch to make it work.

Index: .../feeds/feeds_tamper/plugins/convert_boolean.inc
===================================================================
--- ... /feeds/feeds_tamper/plugins/convert_boolean.inc	
+++ ... /feeds/feeds_tamper/plugins/convert_boolean.inc	
@@ -79,11 +79,11 @@
     $match_field = drupal_strtolower($match_field);
   }
   if ($match_field == $settings['true_value']) {
-    $field = TRUE;
+    $field = 1;
     return;
   }
   if ($match_field == $settings['false_value']) {
-    $field = FALSE;
+    $field = 0;
     return;
   }
   if ($settings['no_match'] == 'pass') {

Comments

topham’s picture

Priority: Normal » Major

Thanks! I spent a significant amount of time trying to get a boolean field working before checking the issues queue.

grahamC’s picture

Version: 7.x-1.0-beta3 » 7.x-1.x-dev
Status: Active » Needs work

I see this patch has already been committed to 7.x-1.x-dev, but it fails to update the "no_match_value" to use 1 and 0 as well...

twistor’s picture

Status: Needs work » Postponed (maintainer needs more info)

Can you tell me about your setup? I am curious in what configuration 1 works but TRUE does not.

grahamC’s picture

I've got a Field of type Boolean (Single on/off checkbox). The "On" and "Off" values are left blank, so it uses the defaults which are 1 and 0.

twistor’s picture

Priority: Major » Normal
Status: Postponed (maintainer needs more info) » Fixed

This was fixed in 7.x a long time ago.

6.x http://drupalcode.org/project/feeds_tamper.git/commit/73779cc

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.