ZBUG-2608: Contacts not importing references from ContactGroups#1237
Draft
ronstra-synacor wants to merge 8 commits intodevelopfrom
Draft
ZBUG-2608: Contacts not importing references from ContactGroups#1237ronstra-synacor wants to merge 8 commits intodevelopfrom
ronstra-synacor wants to merge 8 commits intodevelopfrom
Conversation
When importing contact groups, members were always added inline. Now, we pass a map of all other contacts parsed in the same batch, and if one of them matches an address, that member is stored as a reference instead.
Plus some more informative logging when catching error around adding members to imported contact group.
Contributor
|
Formatting issues... Please fix it to make it more readable |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem:
When importing an exported CSV or TGZ previously exported by Zimbra that has a ContactGroup,
CONTACT_REFreferences are being turned intoINLINE, losing any attributes defined for that contact in the imported file.Fix:
For CSV, inside the
ContactGroupclass, for each member of the "dlist" field, convert all bare inline addresses that have also been imported in the same file with a reference to that imported contact.For TGZ, the approach is similar, but it was very difficult to find just where to implement it. Ended up in
ArchiveFormatter::postProcessContacts.Progress:
CSV fix appears to be good. For TGZ, while the contact does go through
postProcessContacts, I can't figure out how to save it back to the Zimbra store after converting inline addresses to contact references.