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

EICNET-2729: Add drush command to update organisation owners. #2178

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

lramarojaona
Copy link
Collaborator

@lramarojaona lramarojaona commented Mar 12, 2024

Tests

  • drush cr
  • drush eic_groups:update-organisations-ownership
  • drush cr
  • drush sapi-r
  • drush sapi-i
  • Check that most of the organisations have now a new owner instead of "Community manager"

For search re-index, you don't need to wait till the end, luckily group entities are indexed in first place, so you just need to wait the first +/- 8000 items to be indexed.

Monitoring

You can run the following SQL query before and after to have an overview of oragnisations and owners:

SELECT gfd.label, ufd.name FROM group_content_field_data gcfd 
INNER JOIN group_content__group_roles gcgr ON gcfd.id = gcgr.entity_id
INNER JOIN groups_field_data gfd ON gfd.id = gcfd.gid
INNER JOIN users_field_data ufd ON gcfd.entity_id = ufd.uid
WHERE gcfd.type = 'organisation-group_membership'
AND gcgr.group_roles_target_id = 'organisation-owner';

@lramarojaona lramarojaona added the backend Backend development label Mar 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backend Backend development
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant