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

Fix for batches which do not return a result from the dataparser in t… #32

Conversation

nigelgbanks
Copy link

…he first batch.

GitHub Issue: Islandora/documentation#1516

What does this Pull Request do?

Overrides the rewind() function of the SourceBasePlugin extended class to be aware of batches.

What's new?

Function in question will iterate through batches until a valid starting point is found, otherwise it will exhaust all batches and exit as expect.

How should this be tested?

Steps to reproduce:

  1. Create a migration (see the example below).
  2. Make sure that it will match against the given query, but will not be in the first 10 results of the query.
  3. Run the migration.
  4. Note that no taxonomy terms were created.

If using the code from this branch the taxonomy terms should be created as expected.

langcode: en
status: true
dependencies:
  enforced:
    module:
      - migrate_7x_claw
      - migrate_plus
      - islandora
id: islandora_untyped_name
class: null
field_plugin_method: null
cck_plugin_method: null
migration_tags: null
migration_group: islandora_7x
label: 'Islandora Untyped Name'
source:
  plugin: islandora
  solr_base_url: 'http://localhost:9999/solr'
  q: 'fedora_datastreams_ms:MODS'
  row_type: MODS
  fedora_base_url: 'http://localhost:8080/fedora'
  data_fetcher_plugin: http
  authentication:
    plugin: basic
    username: fedoraAdmin
    password: fedoraAdmin
  data_parser_plugin: authenticated_xml
  item_selector: '/mods:mods/mods:name[@type = "" or not(@type)]'
  constants:
    creator_uid: 1
  fields:
    -
      name: name
      label: Name
      selector: 'mods:namePart'
  ids:
    name:
      type: string
process:
  name: name
destination:
  plugin: 'entity:taxonomy_term'
  default_bundle: untyped_name
migration_dependencies:
  required: {  }
  optional: {  }

@nigelgbanks nigelgbanks added the bug Something isn't working label May 21, 2020
@alxp alxp deleted the branch Islandora-Devops:master June 1, 2022 18:37
@alxp alxp closed this Jun 1, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants