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

Fix dedupe regression whereby deleted contacts are found #18214

Merged
merged 1 commit into from
Aug 21, 2020

Conversation

eileenmcnaughton
Copy link
Contributor

@eileenmcnaughton eileenmcnaughton commented Aug 21, 2020

Overview

Fixes a bug where deleted contacts are included in dedupe matches when permissions are applied.

Before

This can be replicated a few ways - the test uses

  $pairs = $this->callAPISuccess('Dedupe', 'getduplicates', [
      'rule_group_id' => 1,
      'check_permissions' => TRUE,
      'criteria' => ['Contact' => ['id' => ['>' => 1]]],
    ])['values'];

and included in the pairs are ones where one contact is deleted

After

Deleted contacts not treated as matches

Technical Details

This affects api calls where check_permissions = TRUE and getduplicates is called. This can be
done via the api (per this test) or ann easy UI way is with the deduper extension but it should
also affect the 'normal' dedupe screen.

Note that there can be cases where the dedupe results are cached into prevnext cache to hide this

Comments

@civibot
Copy link

civibot bot commented Aug 21, 2020

(Standard links)

@civibot civibot bot added the master label Aug 21, 2020
@eileenmcnaughton eileenmcnaughton changed the base branch from master to 5.29 August 21, 2020 03:44
@civibot civibot bot added 5.29 and removed master labels Aug 21, 2020
@eileenmcnaughton
Copy link
Contributor Author

Test fails relate - I will check

This affects api calls where check_permissions = TRUE and getduplicates is called. This can be
done via the api (per this test) or ann easy UI way is with the deduper extension but it should
also affect the 'normal' dedupe screen.

Note that there can be cases where the dedupe results are cached into prevnext cache to hide this
@eileenmcnaughton
Copy link
Contributor Author

test this please

@seamuslee001
Copy link
Contributor

Test cover is good here and the changes make sense to me merge on pass

@eileenmcnaughton eileenmcnaughton merged commit d3b775e into civicrm:5.29 Aug 21, 2020
@eileenmcnaughton eileenmcnaughton deleted the dedupe branch August 21, 2020 21:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants