- Issue created by @vitaliyb98
- ๐ช๐ธSpain fjgarlin
I can see an issue with the synced data. I'm looking into this.
- ๐ช๐ธSpain fjgarlin
Moving to the right project as the data is migrated with the wrong paragraph type.
- ๐ช๐ธSpain fjgarlin
https://www.drupal.org/u/bbu23 โ is also running into the same issue.
- ๐บ๐ธUnited States drumm NY, US
For integrity checking, this is an initial query for a users at organizations manifest in D7. I has all users, so we get a username integrity check too. If we want to narrow the scope, some LEFT JOINs can be INNER
SELECT u.name, u.uid, fdf_on.field_organization_name_value AS organization_name, fdf_or.field_organization_reference_target_id AS organization_nid, fdf_c.field_current_value AS current FROM users u LEFT JOIN field_data_field_organizations fdf_o ON fdf_o.entity_id = u.uid LEFT JOIN field_data_field_organization_reference fdf_or ON fdf_or.entity_id = fdf_o.field_organizations_value LEFT JOIN field_data_field_current fdf_c ON fdf_c.entity_id = fdf_o.field_organizations_value LEFT JOIN field_data_field_organization_name fdf_on ON fdf_on.entity_id = fdf_o.field_organizations_value ORDER BY u.uid, organization_name;
- ๐บ๐ธUnited States drumm NY, US
And the initial version for the new site
SELECT ufd.name, ufd.uid, p_fon.field_organization_name_value AS organization_name, p_for.field_organization_reference_target_id AS organization_nid, p_fc.field_current_value AS current FROM users_field_data ufd LEFT JOIN user__field_user_organizations u_fuo ON u_fuo.entity_id = ufd.uid LEFT JOIN paragraph__field_organization_name p_fon ON p_fon.entity_id = u_fuo.field_user_organizations_target_id LEFT JOIN paragraph__field_organization_reference p_for ON p_for.entity_id = u_fuo.field_user_organizations_target_id LEFT JOIN paragraph__field_current p_fc ON p_fc.entity_id = u_fuo.field_user_organizations_target_id ORDER BY ufd.uid, organization_name;
- ๐บ๐ธUnited States drumm NY, US
Iโve packaged up the integrity checking as a shell script. Spot checking makes it look like a decent first pass.
The list of uids with a diff is:
sed -ne 's/^[+-][^\t]*\t\([0-9]*\)\t.*/\1/p' < user-organizations.diff | uniq
If thatโs accurate, this currently affects 3,604 people.
- Merge request !26Resolve #3544875 "Fix user organizations mismatch" โ (Merged) created by fjgarlin
-
fjgarlin โ
committed 082373f7 on 1.0.x
Resolve #3544875 "Fix user organizations mismatch"
-
fjgarlin โ
committed 082373f7 on 1.0.x
- ๐ช๐ธSpain fjgarlin
I'm integrating the new integrity script into our cron rotation.
I will follow up with a drush command to fix the mismatched data.
- ๐ช๐ธSpain fjgarlin
fjgarlin โ changed the visibility of the branch 1.0.x to hidden.
-
fjgarlin โ
committed d445dc52 on 1.0.x
[#3544875] feat: Work organizations migrated to the new site with a...
-
fjgarlin โ
committed d445dc52 on 1.0.x
- ๐ช๐ธSpain fjgarlin
I've added a new drush command to fix the inconsistencies detected by the integrity check that we added.
I'm going to run that command manually first on a few selected users and if it works as expected, I will add some automation so we can fix directly when detected.
- ๐บ๐ฆUkraine vitaliyb98
@fjgarlin Please let me know when the fix will be ready for testing.
- ๐ช๐ธSpain fjgarlin
@vitaliyb98 - I've run it for your user. Can you try again?
- ๐บ๐ธUnited States drumm NY, US
Iโm seeing 2 remaining edge cases:
- The โcurrentโ bit is sometimes mismatched between sites.
- I didnโt get job title in the diff, and I believe we will have issues there.