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 792567 - Individual.display_name: don't fallback on persona's display_id if it equals the IID
Individual.display_name: don't fallback on persona's display_id if it equals ...
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: 2018-01-16 09:44 UTC by Niels De Graef
Modified: 2018-01-22 12:20 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Individual: don't always use the display_id. (1.07 KB, patch)
2018-01-21 20:09 UTC, Niels De Graef
committed Details | Review

Description Niels De Graef 2018-01-16 09:44:13 UTC
Right now, we use the display_id of the Persona's in an Individual as a fallback for the display_name. This might make sense for e.g. Tpf.Persona's where the display_id is really the identifier. However: for other types persona's (like from E-D-S), this will fall back to the Persona's IID, which we really don't want to display to the user.

So we either:
* Don't use the display-id as a fallback property
* Check in `_look_up_display_id_for_display_name()` whether the persona's display name equals its IID, and if so, to not use it.

Philip: any opinions about this?
Comment 1 Philip Withnall 2018-01-16 12:18:01 UTC
(In reply to Niels De Graef from comment #0)
> * Check in `_look_up_display_id_for_display_name()` whether the persona's
> display name equals its IID, and if so, to not use it.

That seems like a reasonable thing to do.
Comment 2 Niels De Graef 2018-01-21 20:09:58 UTC
Created attachment 367180 [details] [review]
Individual: don't always use the display_id.

Sometimes, a Persona's display_id will fall back to the IID, which
we really don't want to show as a display name.

Fixes bug 792567 (https://bugzilla.gnome.org/show_bug.cgi?id=792567).
Comment 3 Philip Withnall 2018-01-22 10:58:37 UTC
Review of attachment 367180 [details] [review]:

++
Comment 4 Niels De Graef 2018-01-22 12:20:19 UTC
Attachment 367180 [details] pushed as 84b78da - Individual: don't always use the display_id.