Closed Bug 1059544 Opened 10 years ago Closed 10 years ago

[Contacts] Negative Import Numbers after Losing Friends and attempting to Update Facebook Synced Contacts

Categories

(Firefox OS Graveyard :: Gaia::Contacts, defect)

ARM
Gonk (Firefox OS)
defect
Not set
normal

Tracking

(b2g-v2.0 unaffected, b2g-v2.1 verified, b2g-v2.2 verified)

VERIFIED FIXED
2.1 S5 (26sep)
Tracking Status
b2g-v2.0 --- unaffected
b2g-v2.1 --- verified
b2g-v2.2 --- verified

People

(Reporter: onelson, Assigned: hola)

References

()

Details

(Keywords: regression, Whiteboard: [2.1-flame-test-run-1])

Attachments

(3 files)

Description:
When a user attempts to "Update imported friends" from Facebook within their 'Contacts' after losing friends that were previously imported, they will observe a negative number returned. This negative shows the difference between friends previously imported and currently importable: "Import -# friends", which also doesn't provide the user with context of how to progress from there.

Repro Steps:
1) Update a Flame device to BuildID: 20140827040203
2) Open 'Contacts'.
3) Tap the Gear to reach the Settings for 'Contacts'.
4) Sync facebook friends with contacts.
5) Remove a friend from your synced facebook.
6) Attempt to update imported friends.
  
  
Actual:
Facebook import screen displays negative number of friends to import after losing friends.

Expected: 
Facebook import screen displays no less than zero friends to import.
  

Flame 2.1 (319mb)
Environmental Variables:
Device: Flame 2.1 Master
BuildID: 20140827040203
Gaia: 6e804a42ab90f4251c7fe8c68731dc1c6abd8006
Gecko: 0753f7b93ab7
Version: 34.0a1 (2.1 Master)
Firmware: V123
User Agent: Mozilla/5.0 (Mobile; rv:33.0) Gecko/33.0 Firefox/33.0
  
  
Repro frequency: 4/4 (100%)
Link to failed test case: https://moztrap.mozilla.org/manage/case/5231/
See attached: 
video: http://youtu.be/jUWlySKg1qE
logcat
Negative Import Numbers after Losing Friends REPROES on flame 2.1 (512 mb) and open-c 2.1:


Environmental Variables:
Device: Flame Master (512mb)
BuildID: 20140827040203
Gaia: 6e804a42ab90f4251c7fe8c68731dc1c6abd8006
Gecko: 0753f7b93ab7
Version: 34.0a1 (Master) 
Firmware Version: v123
User Agent: Mozilla/5.0 (Mobile; rv:34.0) Gecko/34.0 Firefox/34.0


Environmental Variables:
Device: Open_C Master
Build ID: 20140827040203
Gaia: 6e804a42ab90f4251c7fe8c68731dc1c6abd8006
Gecko: 0753f7b93ab7
Version: 34.0a1 (Master)
Firmware Version: P821A10V1.0.0B06_LOG_DL
User Agent: Mozilla/5.0 (Mobile; rv:34.0) Gecko/34.0 Firefox/34.0


Actual Results:
Importing friends after dropping/losing friends will result in import screen reporting negative numbers: "Import -# friends".

==================================================

Negative Import Numbers after Losing Friends DOES NOT REPRO on flame 2.0 (319mb) or open-c 2.0:


Environmental Variables:
Device: Flame 2.0 (319mb)
BuildID: 20140827000204
Gaia: d72f8ad53448aed577c01ff6e11d958463f261e7
Gecko: 2a18149b3ae8
Version: 32.0 (2.0) 
Firmware Version: v123
User Agent: Mozilla/5.0 (Mobile; rv:32.0) Gecko/32.0 Firefox/32.0


Environmental Variables:
Device: Open_C 2.0
Build ID: 20140827000204
Gaia: d72f8ad53448aed577c01ff6e11d958463f261e7
Gecko: 2a18149b3ae8
Version: 32.0 (2.0)
Firmware Version: P821A10V1.0.0B06_LOG_DL
User Agent: Mozilla/5.0 (Mobile; rv:32.0) Gecko/32.0 Firefox/32.0


Actual Results:
Importing friends after dropping/losing friends displays a result of no new friends to import.
QA Whiteboard: [QAnalyst-Triage?]
Flags: needinfo?(ktucker)
Whiteboard: [2.1-flame-test-run-1]
Keywords: regression
This is a regression and looks odd but i don't think it is a serious enough issue to nominate as a blocker.
QA Whiteboard: [QAnalyst-Triage?] → [QAnalyst-Triage+]
Flags: needinfo?(ktucker)
Jose is this familiar to you?
Flags: needinfo?(jmcf)
yes, I was aware. Assigning it to Adrian
Flags: needinfo?(jmcf)
Assignee: nobody → hola
QA Whiteboard: [QAnalyst-Triage+] → [QAnalyst-Triage+][lead-review+]
Attached file 23998.html
Ternary operator to check if the number of contacts available to import is below zero, and in that case, to set it to zero, causing the right string to appear in the importer UI for every case I checked.
Attachment #8488559 - Flags: review?(jmcf)
Comment on attachment 8488559 [details]
23998.html

cancelling review as we need a test

thanks Adrian!
Attachment #8488559 - Flags: review?(jmcf)
Comment on attachment 8488559 [details]
23998.html

New test added. Everything working fine in local, let's see what tbpl says. Everything seems fine to you?

Thanks!
Attachment #8488559 - Flags: review?(jmcf)
Comment on attachment 8488559 [details]
23998.html

We need to improve the tests cases
Attachment #8488559 - Flags: review?(jmcf)
Comment on attachment 8488559 [details]
23998.html

Two more tests added, passing in local. What do you think?
Attachment #8488559 - Flags: review?(jmcf)
Comment on attachment 8488559 [details]
23998.html

too much code duplication and unconsistent test cases. You need another round
Attachment #8488559 - Flags: review?(jmcf) → review-
Comment on attachment 8488559 [details]
23998.html

Totally right. This time I tried to don't repeat myself so much, using setups and teardowns more. What do you think?
Attachment #8488559 - Flags: review- → review?(jmcf)
Attachment #8488559 - Flags: review?(jmcf) → review+
landed in master:

https://github.com/mozilla-b2g/gaia/commit/1436c23996ec0f44200d1b9bd6fe70f4326a4389
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Keywords: verifyme
Target Milestone: --- → 2.1 S5 (26sep)
This issue is verified fixed on Flame 2.2.

Result: "All your friends are imported" message appears, and no negative number is displayed.

Device: Flame 2.2 (319mb, KK, Shallow Flash)
BuildID: 20141121040204
Gaia: 25388c6bce932657ebf93adedf31881bfaf88c15
Gecko: 3366c0fcf9c2
Version: 36.0a1 (2.2) 
Firmware Version: v188-1
User Agent: Mozilla/5.0 (Mobile; rv:36.0) Gecko/36.0 Firefox/36.0
================================================================

Leaving verifyme for 2.1 patch uplift.
Status: RESOLVED → VERIFIED
QA Whiteboard: [QAnalyst-Triage+][lead-review+] → [QAnalyst-Triage?][lead-review+]
Flags: needinfo?(ktucker)
QA Whiteboard: [QAnalyst-Triage?][lead-review+] → [QAnalyst-Triage+][lead-review+]
Flags: needinfo?(ktucker)
This bug has been successfully verified on latest Flame v2.1.
See attachment: verified_v2.1.mp4.
Reproduce rate: 0/5

STR:
1. Open Contacts app.
2. Tap Settings icon.
3. Sign in facebook account and sync facebook friends.
**When select all friends to import,the number displays normally.
4. Delect a FB contact in Contacts list,or tap "Update imported friends" and uncheck a friend,and then tap Update in Facebook friends list.
5. Verify the number under Sync friends.
**There is no negative number displaying.

Flame 2.1 build:
Gaia-Rev        9df43e6e696da43b6a1433283dc5b155987747bc
Gecko-Rev       https://hg.mozilla.org/releases/mozilla-b2g34_v2_1/rev/095a46f32cd4
Build-ID        20150129003733
Version         34.0
Device-Name     flame
FW-Release      4.4.2
FW-Incremental  eng.cltbld.20150129.041104
FW-Date         Thu Jan 29 04:11:14 EST 2015
Bootloader      L1TC000118D0
QA Whiteboard: [QAnalyst-Triage+][lead-review+] → [QAnalyst-Triage+][lead-review+][MGSEI-Triage+]
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: