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

js error #10

Closed
eileenmcnaughton opened this issue Feb 26, 2021 · 2 comments
Closed

js error #10

eileenmcnaughton opened this issue Feb 26, 2021 · 2 comments

Comments

@eileenmcnaughton
Copy link
Owner

eileenmcnaughton commented Feb 26, 2021

Still evolving debug steps but here is the set up data on a clean wmff build

The issue is the merged contact is not being satisfactorily removed from the screen

image

Essentially you need to create a set of mergeable contacts where a contact that is going to be deleted is in multiple rows. When the merge happens the first pair is deleted but if the next one is directly after it gets skipped (due to re-indexing).

Deduping this set was mostly working in testing

CRM.api3('Contact', 'create', {
'first_name':'Bob',
'last_name' : 'Bob',
'email' : 'Bob@bob.com',
'contact_type' : 'Individual'
});
CRM.api3('Contact', 'create', {
'first_name':'Bob',
'last_name' : 'Bob',
'email' : 'Bob@bob.com',
'contact_type' : 'Individual',
'api.contribution.create' : {'total_amount' : 50, 'financial_type_id' : 'Donation'}
});
CRM.api3('Contact', 'create', {
'first_name':'Different',
'last_name' : 'Bob',
'email' : 'Bob@bob.com',
'contact_type' : 'Individual'
});
CRM.api3('Contact', 'create', {
'first_name':'Richard',
'last_name' : 'Bob',
'email' : 'Bob@bob.com',
'contact_type' : 'Individual'
});
@eileenmcnaughton
Copy link
Owner Author

Trying $scope.duplicatePairs = $.grep($scope.duplicatePairs, function (pair) {
return typeof(pair) !== 'undefined' && (pair.dstID === id || pair.srcID === id);
});

It might cause more dom changes as the array object changes whether it has to or not

eileenmcnaughton added a commit that referenced this issue Feb 26, 2021
This addresses #10 - which is a tricky issue to replicate although I was
managing semi-reliably with the contact creates in that issue.
@eileenmcnaughton
Copy link
Owner Author

I think that fixed it

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

No branches or pull requests

1 participant