Closed Bug 922988 Opened 11 years ago Closed 6 years ago

[User Story][Meta][DSDS] Avoid duplicate contacts when exporting to SIM

Categories

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

ARM
Gonk (Firefox OS)
defect
Not set
normal

Tracking

(blocking-b2g:-)

RESOLVED WONTFIX
blocking-b2g -

People

(Reporter: noemi, Unassigned)

References

Details

In order to avoid duplicate contacts when exporting to SIM we would need:

gecko: 
- send to gaia "recordId" info when importing/exporting to SIM
- when exporting a contact, if there is "recordId" info, overwrite the contact into the SIM

gaia:
- store "recordId" info sent by gecko when importing
- provide "recordId" info to gecko when exporting
blocking-b2g: --- → koi?
Michael, could you check if this is a certification blocker ?
Flags: needinfo?(mvines)
I don't think this will block any certification requirements that I know of, it's just a pretty bad user experience
Flags: needinfo?(mvines)
Minus for now, lets re-nom if this does become an issue.
blocking-b2g: koi? → -
cc RIL team so this goes to RIL team radar as well
Summary: [Meta] Avoid duplicate contacts when exporting to SIM → [Meta][DSDS] Avoid duplicate contacts when exporting to SIM
(In reply to Noemí Freire (:noemi) from comment #0)
> In order to avoid duplicate contacts when exporting to SIM we would need:
> 
> gecko: 
> - send to gaia "recordId" info when importing/exporting to SIM
> - when exporting a contact, if there is "recordId" info, overwrite the
> contact into the SIM
> 
> gaia:
> - store "recordId" info sent by gecko when importing
> - provide "recordId" info to gecko when exporting

Hi, Noemi

Can you exlaborate the correct behavior here?

The "recordId" you said didn't expose to Gaia for some reasons,

For importing, suppose the SIM has 1 contact,say
[recordId-Name-Number]
1-Test-1234567,

so you expect the contact will be imported to ContactDB only once, even when I press 'Import SIM Contact' for twice.

case A: I pull out the SIM, and modify the SIM contact in *another* device, 
1-NEW-98765432

So now I put the SIM back to the original device, when the 2nd SIM import, 
it should also import the updated SIM contact, even the recordId is the same.

But if in another device, I modify the SIM contact to 
2-Test-1234567, 
I move the SIM contact the the 2nd position.
Now put the SIM back to the original device, when the 2nd SIM contact import, 
The SIM contact will not be imported to the Contact DB.

So when Gaia needs is just the name and telphone number from SIM contact, not the recordId(the physical location stored in the SIM)

The same reasoning goes when exporting and with another SIMcard(the recordId may be the same but on differnt SIM), so I don't list Case B,.. here.

I don't think we need to add the recordId for exporting/importing from Gecko side.
(But we will need some id-mapping when updating/deleting a SIM contact, but I don't think update/delete is included in this bug).

thanks
Summary: [Meta][DSDS] Avoid duplicate contacts when exporting to SIM → [User Story][Meta][DSDS] Avoid duplicate contacts when exporting to SIM
In reply to Yoshi Huang[:allstars.chh][:yoshi] from comment #5)
> (In reply to Noemí Freire (:noemi) from comment #0)
> > In order to avoid duplicate contacts when exporting to SIM we would need:
> > 
> > gecko: 
> > - send to gaia "recordId" info when importing/exporting to SIM
> > - when exporting a contact, if there is "recordId" info, overwrite the
> > contact into the SIM
> > 
> > gaia:
> > - store "recordId" info sent by gecko when importing
> > - provide "recordId" info to gecko when exporting
> 
> Hi, Noemi
> 
> Can you exlaborate the correct behavior here?
> 
> The "recordId" you said didn't expose to Gaia for some reasons,
> 
The idea would be to export contacts to SIM without duplicating content but updating instead. If a user exports contacts once, then performs local changes and exports them again, s/he would expect the last local changes to be applied in the SIM contact list: updates, new entries...., avoiding duplicate contacts.

> For importing, suppose the SIM has 1 contact,say
> [recordId-Name-Number]
> 1-Test-1234567,
> 
> so you expect the contact will be imported to ContactDB only once, even when
> I press 'Import SIM Contact' for twice.
> 
> case A: I pull out the SIM, and modify the SIM contact in *another* device, 
> 1-NEW-98765432
> 
> So now I put the SIM back to the original device, when the 2nd SIM import, 
> it should also import the updated SIM contact, even the recordId is the same.
> 

If user modifies the SIM contact in other device and then put the SIM back, when importing again, recordId=1 will be imported and the information will be updated. That would be the expected behavior.

> But if in another device, I modify the SIM contact to 
> 2-Test-1234567, 
> I move the SIM contact the the 2nd position.
> Now put the SIM back to the original device, when the 2nd SIM contact
> import, 
> The SIM contact will not be imported to the Contact DB.
> 

In this case, the contact would be imported within recordId=2

> So when Gaia needs is just the name and telphone number from SIM contact,
> not the recordId(the physical location stored in the SIM)
> 

The name and phone number don't uniquely identify an entry, they can be modified but the record remains the same. It is not a new contact but the previous one modified. Using "recordId", when importing we could always update the existing recordIds and create the new ones avoiding duplicate entries. It allows to handle import/export functionality to/from SIM.

> The same reasoning goes when exporting and with another SIMcard(the recordId
> may be the same but on differnt SIM), so I don't list Case B,.. here.
> 
> I don't think we need to add the recordId for exporting/importing from Gecko
> side.
> (But we will need some id-mapping when updating/deleting a SIM contact, but
> I don't think update/delete is included in this bug).
> 

Following this approach, we would cover "update" functionality "by default", regarding "delete" one, it could be easily handled in the future based on recordId. Thanks.

> thanks
Blocks: 929481
No longer blocks: 929481
Depends on: 929481
Depends on: 943298
Depends on: 943234, 944275
Depends on: 944575
Hei Jose, do you know the state of this?
Flags: needinfo?(jmcf)
only is pending bug 944275. Basically, the functionality missing is detecting duplicates when the origin of the Contacts on the SIM card is different than the DUT (i.e. existing contacts in your SIM card which have never been known by the DUT). 

Something we intended to do but it was not done due to other priorities. I believe we can move it to backlog.
Flags: needinfo?(jmcf)
Firefox OS is not being worked on
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.