Opush
  1. Opush
  2. OP-139

T#9813 Protect OBM about contact duplication

    Details

    • Type: New Feature New Feature
    • Status: Closed Closed
    • Priority: Normal Normal
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 3.0.6
    • Labels:
      None
    • Story Points:
      6
    • Rank:
      23
    • Sprint:
      OBM Sprint 2015#1

      Description

      Pre-conditions

      Use an Android device

      Reproduction steps

      1. usera creates a contact on its phone
      2. server is slow enough to have the phone issue the same request
      3. both request eventually get processed

      Current behavior

      1. The contact is inserted twice : NOK

      Expected behavior

      1. The contact is inserted once : OK

      Additional informations

      This changeset aims to protect the backend about contact duplication.
      That protection is implemented using the hash of every contact created by a device.
      When a contact hash is already known by Opush, it'll not send the creation command to its backend.

      This fix has been done to handle the never fixed "ClientId" bug of Android, see https://code.google.com/p/android/issues/detail?id=61100

        Issue Links

          Activity

          Hide
          Jenkins Continuous Integration Server added a comment -

          ABORTED: Integrated in opush-master-3.0 #27
          OP-139 Add fields taken into account (thilaire: cbd3d960426bff3282acddcf3ac7d3f54074a4c9)

          • obm-backend/src/test/java/org/obm/push/contacts/ContactCreationIdempotenceServiceTest.java
          • obm-backend/src/main/java/org/obm/push/contacts/ContactCreationIdempotenceService.java
          Show
          Jenkins Continuous Integration Server added a comment - ABORTED: Integrated in opush-master-3.0 #27 OP-139 Add fields taken into account (thilaire: cbd3d960426bff3282acddcf3ac7d3f54074a4c9 ) obm-backend/src/test/java/org/obm/push/contacts/ContactCreationIdempotenceServiceTest.java obm-backend/src/main/java/org/obm/push/contacts/ContactCreationIdempotenceService.java
          Hide
          Stephane COLSON added a comment -

          OK with Opush 3.0.6~rc3-1, tested on a Wheezy with ipad (iOS 8.1.3), Nexus 7 (Android 4.4.3, 4.4.4 and 5.0.2), Fairphone FP1 (Android 4.2.2) and lovely Windows Phone 8.1 Lumia 920

          See OP-163 for a new Issue with WP8
          Please note that it is possible to have duplicate contacts on the smartphone easily, but this new behavior prevent from sending it to OBM.
          It is also possible to have a duplicate contact in OBM when having 2 different contacts already synchronized, and you modify one in order to be exactly the same as the other. Comparison only works for new creation, not with modification.

          Show
          Stephane COLSON added a comment - OK with Opush 3.0.6~rc3-1, tested on a Wheezy with ipad (iOS 8.1.3), Nexus 7 (Android 4.4.3, 4.4.4 and 5.0.2), Fairphone FP1 (Android 4.2.2) and lovely Windows Phone 8.1 Lumia 920 See OP-163 for a new Issue with WP8 Please note that it is possible to have duplicate contacts on the smartphone easily, but this new behavior prevent from sending it to OBM. It is also possible to have a duplicate contact in OBM when having 2 different contacts already synchronized, and you modify one in order to be exactly the same as the other. Comparison only works for new creation, not with modification.
          Hide
          Stephane COLSON added a comment -

          I QA this

          Show
          Stephane COLSON added a comment - I QA this
          Hide
          Thomas HILAIRE added a comment - - edited

          Impacts: no change comparing than the previous one
          QA: same things + more fields are now taken into account so such creation are now considerate as different:
          ==
          Firstname: Serge
          Lastname: Gainsbourg
          Spouse: Jane Birkin
          ==
          Firstname: Serge
          Lastname: Gainsbourg
          Spouse: Bambou
          ==
          Note: can you test with accent or specials chars anywhre ?

          Show
          Thomas HILAIRE added a comment - - edited Impacts : no change comparing than the previous one QA : same things + more fields are now taken into account so such creation are now considerate as different: == Firstname: Serge Lastname: Gainsbourg Spouse: Jane Birkin == Firstname: Serge Lastname: Gainsbourg Spouse: Bambou == Note : can you test with accent or specials chars anywhre ?
          Hide
          Stephane COLSON added a comment -

          With version 3.0.6-rc2 (and OBM 3.1.1)

          Reproduction steps

          1. As usera with Ipad, create a new contact with
          • firstname = Jacques
          • lastname = Martin
          • company = Michelin
          • Phone number (home) = 01 23 45 67 89
          1. As usera with Ipad, create another contact with
          • firstname = Jacques
          • lastname = Martin
          • company = Goodyear
          • Phone number (home) = 02 45 32 23 60

          Current behavior

          1. Only one is retrieved in obm-ui NOK

          Expected behavior

          1. Both should be uploaded to ui OK

          Additional informations

          Company and home phone number are not used to see if it's a duplicate. These 2 informations are the first informations in the contact form on an ipad.
          We should probably compare all informations. To be discussed

          Show
          Stephane COLSON added a comment - With version 3.0.6-rc2 (and OBM 3.1.1) Reproduction steps As usera with Ipad, create a new contact with firstname = Jacques lastname = Martin company = Michelin Phone number (home) = 01 23 45 67 89 As usera with Ipad, create another contact with firstname = Jacques lastname = Martin company = Goodyear Phone number (home) = 02 45 32 23 60 Current behavior Only one is retrieved in obm-ui NOK Expected behavior Both should be uploaded to ui OK Additional informations Company and home phone number are not used to see if it's a duplicate. These 2 informations are the first informations in the contact form on an ipad. We should probably compare all informations. To be discussed

            People

            • Assignee:
              Stephane COLSON
              Reporter:
              Matthieu EXT_BAECHLER
            • Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Agile