After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 681346 - Individual id can be inconsistent
Individual id can be inconsistent
Status: RESOLVED FIXED
Product: folks
Classification: Platform
Component: general
git master
Other Linux
: Normal normal
: Unset
Assigned To: folks-maint
folks-maint
Depends on:
Blocks:
 
 
Reported: 2012-08-07 02:20 UTC by Jeremy Whiting
Modified: 2012-08-09 15:32 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Add one more priority to chosen_persona heuristic for when two personas come from the same store (1.67 KB, patch)
2012-08-07 02:20 UTC, Jeremy Whiting
accepted-commit_now Details | Review

Description Jeremy Whiting 2012-08-07 02:20:47 UTC
Created attachment 220505 [details] [review]
Add one more priority to chosen_persona heuristic for when two personas come from the same store

If two personas from the same backend are linked, the Individual id can be either one or the other persona hash depending on the order they are iterated over from the personas set.

Even though it's not likely to link two contacts from the same persona store, if/when it happens this causes two subsequent calls to folks-inspect individuals to possibly have different ids.  In order to fix this the personas from the same persona store need to have some way of deciding which is preferred in Individual _set_personas.

Attached is a patch that adds preference to the persona with the lowest uid alphabetically if personas are from the same persona store.
Comment 1 Philip Withnall 2012-08-08 22:30:03 UTC
Review of attachment 220505 [details] [review]:

Good catch! Please commit to master. :-)
Comment 2 Jeremy Whiting 2012-08-09 15:32:18 UTC
Pushed to master.