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

dev/core996 Ensure that the oldest created_date is retained no matter… #14368

Merged
merged 1 commit into from
May 29, 2019

Conversation

seamuslee001
Copy link
Contributor

… the ids of the contacts being merged

Overview

When contacts are flipped around during merge it is possible that the oldest created_date gets lost in the merge process this fixes it

Before

oldest created date may get lost

After

oldest created date is always retained

ping @eileenmcnaughton @mattwire @lcdservices @JKingsnorth @andrew-cormick-dockery @johntwyman

@civibot
Copy link

civibot bot commented May 29, 2019

(Standard links)

@civibot civibot bot added the master label May 29, 2019
@yashodha
Copy link
Contributor

test this please

@@ -894,6 +922,7 @@ public function setupMatchData() {
foreach ($fixtures as $fixture) {
$contactID = $this->individualCreate($fixture);
$this->contacts[] = array_merge($fixture, ['id' => $contactID]);
sleep(20);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we get away with 5 or 10?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeh i guess i was wanting something 'meaningful'

… the ids of the contacts being merged

Reduce sleep to 5
@eileenmcnaughton
Copy link
Contributor

This is is a horrible fix - and as such it's totally in keeping with the surrounding code.

It adds test coverage so I'm happy to merge, knowing that we can keep cleaning up the code

@eileenmcnaughton eileenmcnaughton merged commit 9bd1c7f into civicrm:master May 29, 2019
@eileenmcnaughton eileenmcnaughton deleted the dev_core_996 branch May 29, 2019 23:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants