Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Missing field b error #890

Closed
jeremyf opened this issue Dec 11, 2023 · 0 comments
Closed

Missing field b error #890

jeremyf opened this issue Dec 11, 2023 · 0 comments

Comments

@jeremyf
Copy link
Contributor

jeremyf commented Dec 11, 2023

When running an importer with the following Bulkrax parser configuration, we encountered a "Missing field b error":

config.field_mappings['Bulkrax::CsvParser'] = {
  'bulkrax_identifier' => { from: ['source_identifier'], source_identifier: true, search_field: 'bulkrax_identifier_tesim' },
  'children' => { from: ['children'], split: /\s*[;|]\s*/, related_children_field_mapping: true },
  'parents' => { from: ['parents'], split: /\s*[;|]\s*/, related_parents_field_mapping: true }
}
jeremyf added a commit that referenced this issue Dec 11, 2023
The chaining logic for was grabbing the first letter of a single
search_field value; instead of grabbing the first value in the
'search_field' object.

To fix the problem, we cast the value of `search_field` into an array
and then grab the first array element.

Related to:

- #890
jeremyf added a commit that referenced this issue Dec 11, 2023
* 🐛 Fix #work_identifier_search_field logic

The chaining logic for was grabbing the first letter of a single
search_field value; instead of grabbing the first value in the
'search_field' object.

To fix the problem, we cast the value of `search_field` into an array
and then grab the first array element.

Related to:

- #890

* 🧹 Appease rubocop
@jeremyf jeremyf closed this as completed Dec 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant