-
-
Notifications
You must be signed in to change notification settings - Fork 825
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/core/#/233 Expose information about where a contact has been merged to #12489
Conversation
(Standard links)
|
393d274
to
7089a03
Compare
…stination contact and source contacts for merged contacts. This 'data structure' is 'owned' by core & somewhat subject to future change so establishing a tested methodology for retrieving contact history in core can support extensions such as - extended reports - which exposes an address_history tab - privacy extensions - which need to recover and potentially delete contacts that were merged into the current contact
…act deleted by merge
7089a03
to
93ddaac
Compare
test fail is unrelated |
(CiviCRM Review Template WORD-1.1)
|
@totten yes test is a known bug (from a merge yesterday although hopefully fix is in) - what is holding this up now? |
test this please |
(there is space in test queue to re-running as it's harder to get people to look when there is a red flag) |
In addition to the above.
|
@stesi561 you are my new favourite person - really appreciate this. Adding merge-on-pass |
unrelated fail |
I'm a bit late to this party, but it looks OK to me. I have some reservations about the display of the (This contact has been merged into...). (It might have been nicer on the next line down after the name, rather than inline). But not so strong as to block anything, and it doesn't impact the inline editing of the name because that's not possible on a deleted contact. |
I'll happily merge a prettier version if you have an idea |
@@ -306,7 +306,7 @@ public static function checkUserPermission($page, $contactID = NULL) { | |||
*/ | |||
public static function setTitle($contactId, $isDeleted = FALSE) { | |||
static $contactDetails; | |||
$displayName = $contactImage = NULL; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is the declaration of display name deleted?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
because it was that funny grey in phpstorm (ie. it's immediately re-defined)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
isn't the contactImage declaration removed?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nope, just on the next line down =]
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah I agree with @JKingsnorth that we should remove both.
…ct and source contacts for merged contacts. Backport of civicrm#12489 This 'data structure' is 'owned' by core & somewhat subject to future change so establishing a tested methodology for retrieving contact history in core can support extensions such as - extended reports - which exposes an address_history tab - privacy extensions - which need to recover and potentially delete contacts that were merged into the current contact dev/core/#/233 Use merged data api to display navigation help on contact deleted by merge Bug: T199748 Change-Id: I299725a8d39cd45d205874b1f07641283cbb5c96
Overview
Exposes information about what contact a contact deleted by merge has been merged from. Via the api it exposes this and also which contacts have been merged into a given contact.
Before
Poor visibility on where a contact has been deleted as part of a merge
![screenshot 2018-07-17 17 25 11](https://user-images.githubusercontent.com/336308/42798081-626737ea-89e6-11e8-8b0b-6dde80e6cabc.png)
After
Merged nature is much clearer.
![screenshot 2018-07-17 17 25 27](https://user-images.githubusercontent.com/336308/42798089-6b358bb0-89e6-11e8-88c5-8f658b469416.png)
In addition the calculus for the 'merged to' & 'merged from' is exposed via api
Technical Details
We have a fairly opaque data structure for linking merged contacts to the contacts they have been merged to. There have been various discussions about changing it so I feel like the ownership of exposing this relationship should sit in core.
Examples of where this could be used by an extension are
The apis used here (open to any form of bikeshedding on action name / params) are:
In each case result is an array of one (getmergedto) or n (getmergedfrom) contact records, with only 'id' populated.
Comments
https://lab.civicrm.org/dev/core/issues/233
@totten @colemanw @JKingsnorth