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

Add userid option to migrate:rollback #741

Merged
merged 2 commits into from
Nov 20, 2019
Merged

Add userid option to migrate:rollback #741

merged 2 commits into from
Nov 20, 2019

Conversation

seth-shaw-unlv
Copy link

GitHub Issue: Islandora/documentation#1322

What does this Pull Request do?

Adds the userid option to the Drush migrate:rollback command.

What's new?

  • pulls validating the option, switching the user, and switching the user back into separate functions.
  • modifies the existing functions to call the generalized ones.
  • adds new functions to implement the hooks for rollback.
  • Does this change require documentation to be updated? No.
  • Does this change add any new dependencies? No.
  • Does this change require any other modifications to be made to the repository
    (i.e. Regeneration activity, etc.)? No.
  • Could this change impact execution of existing code? No.

How should this be tested?

  • Try to rollback a migration using the drush command; you won't see a message about user switching and, even if you don't get an error, Fedora won't reflect the changes.
  • Apply the PR.
  • Do another rollback using the userid flag and the userid of an account with the fedoraAdmin role. You should see a notice with "Now acting as user" and the changes should be reflected in Fedora.
  • Do the migration again, using the userid flag again, and all the stuff should show up in Fedora.

Interested parties

@Islandora/8-x-committers, esp @dannylamb. We'll tag @DonRichards 'cause he 👍 the issue.

@dannylamb
Copy link

I can confirm this works great. Tested and happy with it 👍

@dannylamb dannylamb merged commit 31faef8 into Islandora:8.x-1.x Nov 20, 2019
@seth-shaw-unlv seth-shaw-unlv deleted the issue-1322 branch November 20, 2019 17:41
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.

2 participants