1

I'm trying to run a migration and one of the fields in Drupal is a boolean. For some reason I cannot get it to import the boolean value.

In Drupal

The field type is boolean, the on/off labels are yes/no (I've also tried setting them to on/off). the machine name is field_release_compilation

In my data source (Google sheets the data is stored as:

"gsx$compilation":{"$t":"1"}

I have also tried values of "TRUE", "on", "Yes" as well as "1"

In my migration

I'm using the google sheets plugin, along with migrate plus and migrate tools. The rest of the data pulls in fine so there's no issue connecting to sheets or that it's viewing the wrong doc/worksheet.

I remap the field using (I'm remapping every field, the others work fine)

fields:
- name: Compilation
  label: Compilation
  selector: compilation

I've tried the following ways of processing the field, all to no avail:

field_release_compilation:
  - type: bool
    source: Compilation

field_release_compilation:
  - fieldtype: bool
    source: Compilation

field_release_compilation:
  - type: boolean
    source: Compilation

field_release_compilation:
  - fieldtype: boolean
    source: Compilation

field_release_compilation:
  - callable: boolval
    source: Compilation

I'm not sure what to try next...

3
  • 1
    Have you tried field_release_compilation: Compilation?
    – sonfd
    Jun 5 '20 at 1:00
  • 1
    Also, I think you want to use 0/1 as vals in your google sheet unless you're planning to use a process plugin to manipulate.
    – sonfd
    Jun 5 '20 at 15:43
  • 1
    Hi, Yes I've tried both of those. Neither works
    – Al_
    Jun 9 '20 at 20:08

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.