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

Catch case changes in file names when harvesting #3706

Merged
merged 3 commits into from
Nov 15, 2021
Merged

Catch case changes in file names when harvesting #3706

merged 3 commits into from
Nov 15, 2021

Conversation

janette
Copy link
Member

@janette janette commented Nov 12, 2021

QA Steps

  • copy the h1.json.txt file from this ticket (drop the .txt) to your /src/site/files directory
  • run dktl drush dkan:harvest:register '\{"identifier":"h1","extract":{"type":"\\Harvest\\ETL\\Extract\\DataJson","uri":"http://dkan.localtest.me/sites/default/files/h1.json"},"transforms":[],"load":\{"type":"\\Drupal\\harvest\\Load\\Dataset"}}'
  • then dktl drush dkan:harvest:run h1
  • look at the harvested dataset in the edit form, notice the case of the filename
  • edit the h1.json file: change downloadURL to

"http://demo.getdkan.org/sites/default/files/distribution/cedcd327-4e5d-43f9-8eb1-c11850fa7c55/bike_lane.csv"

  • run the harvest again
  • look at the dataset in the edit form, confirm the filepath was updated

h1.json.txt

Copy link
Member

@dafeder dafeder left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This could be QA'ed with just a simple API call starting with one URL than patching with another, right? Not harvest-specific. I added a quick unit test.

@janette janette merged commit 46784d9 into 2.x Nov 15, 2021
@janette janette deleted the WCMS-7209 branch November 15, 2021 16:20
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

Successfully merging this pull request may close these issues.

None yet

2 participants