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 705196 - Linking a favorite TP contact with a EDS one unfavorite it
Linking a favorite TP contact with a EDS one unfavorite it
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: 2013-07-31 10:01 UTC by Guillaume Desmottes
Modified: 2013-07-31 12:21 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
consider an individual as favorite if one of its persona is a favorite (1.27 KB, patch)
2013-07-31 10:59 UTC, Guillaume Desmottes
committed Details | Review

Description Guillaume Desmottes 2013-07-31 10:01:58 UTC
- Pick a pure (no other persona) Telepathy contact and mark it as favorite (using empathy for example)
- The contact appears as a favorite in Empathy
- Open gnome-contacts and change the avatar of this contact. By doing so it's now linked to another EDS persona.
- The contact doesn't appear as a favorite any more
- Unlink the two personas in gnome-contacts
- It's back as a favorite again
Comment 1 Guillaume Desmottes 2013-07-31 10:26:22 UTC
Here is the individual in folks-inspect. As you can see the TP persona is marked as a favorite but the whole individual is not. Shouldn't we consider an individual as a favorite if it has at least one favorite persona?

Individual '64d24c8078eef82d5eb6b11ade3af7b1d79820b4' with 3 personas:
  trust-level           FOLKS_TRUST_LEVEL_PERSONAS
  avatar                0x7f2a900140c0 (file: file:///home/badger/.local/s
  presence-type         FOLKS_PRESENCE_TYPE_OFFLINE
  presence-status       offline
  presence-message      
  is-user               FALSE
  id                    64d24c8078eef82d5eb6b11ade3af7b1d79820b4
  alias                 Bo$$ulica
  structured-name       , Bo$$ulica, , , 
  full-name             Bo$$ulica
  nickname              
  gender                FOLKS_GENDER_UNSPECIFIED
  urls                  {  }
  phone-numbers         {  }
  email-addresses       {  }
  roles                 {  }
  local-ids             { 'system-address-book:pas-id-51F8DB3600000004', '
  location              (nil)
  birthday              
  calendar-event-id     (null)
  notes                 {  }
  postal-addresses      {  }
  is-favourite          FALSE
  groups                {  }
  im-addresses          { 'jabber' : { 'xxxxchat006@jabber.org' } }
  web-service-addresses  {  }
  im-interaction-count  0
  last-im-interaction-datetime  (null)
  call-interaction-count  0
  last-call-interaction-datetime  (null)
  
  Personas:
    Persona 'eds:system-address-book:pas-id-51F8E00800000005':
      iid                   system-address-book:pas-id-51F8E00800000005
      uid                   eds:system-address-book:pas-id-51F8E0080000000
      display-id            
      is-user               FALSE
      store                 0xcf0120: eds, system-address-book (system-add
      individual            0xcb3dc0
      contact               0x7f2a7c0184a0
      web-service-addresses  {  }
      local-ids             { 'system-address-book:pas-id-51F8DB3600000004
      location              (nil)
      postal-addresses      {  }
      phone-numbers         {  }
      email-addresses       {  }
      notes                 {  }
      linkable-properties   { 'im-addresses', 'email-addresses', 'local-id
      writeable-properties  { 'local-ids', 'web-service-addresses', 'gende
      avatar                (null)
      structured-name       (null)
      contact-id            pas-id-51F8E00800000005
      full-name             
      nickname              
      gender                FOLKS_GENDER_UNSPECIFIED
      urls                  {  }
      im-addresses          { 'jabber' : { 'xxxxchat006@jabber.org' } }
      groups                {  }
      calendar-event-id     (null)
      birthday              
      roles                 {  }
      is-favourite          FALSE
      anti-links            {  }
      system-groups         Can't convert from type 'GeeSet' to 'gchararra
      in-google-personal-group  FALSE
    Persona 'telepathy:/org/freedesktop/Telepathy/Account/gabble/jabber/in
      iid                   jabber:xxxxchat006@jabber.org
      uid                   telepathy:/org/freedesktop/Telepathy/Account/g
      display-id            xxxxchat006@jabber.org
      is-user               FALSE
      store                 0xcb1140: telepathy, /org/freedesktop/Telepath
      individual            0xcb3dc0
      is-in-contact-list    TRUE
      avatar                (null)
      structured-name       (null)
      full-name             
      nickname              
      calendar-event-id     (null)
      birthday              
      presence-type         FOLKS_PRESENCE_TYPE_OFFLINE
      presence-status       offline
      presence-message      
      linkable-properties   { 'im-addresses' }
      writeable-properties  { 'is-favourite', 'groups', 'alias' }
      alias                 Bo$$ulica
      is-favourite          TRUE
      email-addresses       {  }
      im-addresses          { 'jabber' : { 'xxxxchat006@jabber.org' } }
      im-interaction-count  0
      last-im-interaction-datetime  (null)
      call-interaction-count  0
      last-call-interaction-datetime  (null)
      groups                {  }
      contact               0xcae260
      phone-numbers         {  }
      urls                  {  }
    Persona 'eds:system-address-book:pas-id-51F8DB3600000004':
      iid                   system-address-book:pas-id-51F8DB3600000004
      uid                   eds:system-address-book:pas-id-51F8DB360000000
      display-id            Bo$$ulica
      is-user               FALSE
      store                 0xcf0120: eds, system-address-book (system-add
      individual            0xcb3dc0
      contact               0x7f2a7c018020
      web-service-addresses  {  }
      local-ids             { 'system-address-book:pas-id-51F8DB3600000004
      location              (nil)
      postal-addresses      {  }
      phone-numbers         {  }
      email-addresses       {  }
      notes                 {  }
      linkable-properties   { 'im-addresses', 'email-addresses', 'local-id
      writeable-properties  { 'local-ids', 'web-service-addresses', 'gende
      avatar                0x7f2a900140c0 (file: file:///home/badger/.loc
      structured-name       , Bo$$ulica, , , 
      contact-id            pas-id-51F8DB3600000004
      full-name             Bo$$ulica
      nickname              
      gender                FOLKS_GENDER_UNSPECIFIED
      urls                  {  }
      im-addresses          {  }
      groups                {  }
      calendar-event-id     (null)
      birthday              
      roles                 {  }
      is-favourite          FALSE
      anti-links            {  }
      system-groups         Can't convert from type 'GeeSet' to 'gchararra
      in-google-personal-group  FALSE
Comment 2 Guillaume Desmottes 2013-07-31 10:59:22 UTC
Created attachment 250533 [details] [review]
consider an individual as favorite if one of its persona is a favorite

We used to consider all the personas as having the "is-favourite" property
defined. So _update_single_valued_property was giving the priority to the
primary store (usually EDS) leading to the individual being considered as
unfavourite even if it has a Telepathy persona as favourite.

We now consider the "is-favourite" property being defined if it's set to TRUE
so any favourite persona will take presedence.
Comment 3 Philip Withnall 2013-07-31 12:18:20 UTC
Review of attachment 250533 [details] [review]:

Looks good. Please commit, and don’t forget to update NEWS. Thanks!
Comment 4 Guillaume Desmottes 2013-07-31 12:21:00 UTC
Merged to master; will be in 0.9.4

Attachment 250533 [details] pushed as ba71ffb - consider an individual as favorite if one of its persona is a favorite