Bulk move people from an old to a new team for specific teams #805
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
Support some cleaning up work that's been done to tidy up members under some specific prison establishments
The user has set up old and new teams as described in the ticket.
Verify the team names are as they should be, then run
rake peoplefinder:data:etc:bulk_move_lewes_huntercombe_coldingley
to move all team members from the old team into the new team, preserving existing members of the new team, and delete the old team.The script uses
<<
to copy the members from the old team and preserve existing memberships in the new team.The old teams have no sub teams.
Self-review checklist
CT-7654 ...
Screenshots
Related JIRA tickets
Deployment
Manual testing instructions
To replicate the scenario, find three teams that have members in them. Create three new empty teams and add a couple of canary users to one of them matching the scenarios below. Log into the namespace and run the rake task. You get one go and there's no rollback, so recommend testing thoroughly on non-prod environments first.
Scenarios to test