UbiCollab / UbiShare

Share ubiquitously!
1 stars 1 forks source link

Setting of _ID_PEOPLE in Me? #57

Open JacquelineFloch opened 11 years ago

JacquelineFloch commented 11 years ago

I do not understand who is responsible for setting the the field _ID_PEOPLE..

The problem is. I might do the following:

Alternative 1:

  1. Install and start SocialProvider/UbiShare
  2. Add the box.com account (I cannot do that before starting SocialProvider) beacuse box is not available as an option) => the account is added to Me
  3. Use the populateUbiShare App to populate people and services.

Alternative 2:

  1. Install and start SocialProvider
  2. Use the populateUbiShare App to populate people and services.
  3. Add the box.com account (I cannot do that before starting SocialProvider) beacuse box is not available as an option) => the account is added to Me

In alternative 1 there is no entries in People when the account is added to Me. I find out using debug that _ID_PEOPLE is set to -1

In alternative 2 there is no entries in Me (at least no relevant one) when People is populated. Is SocialProvider setting the filed in that case. I find out using debug that _ID_PEOPLE is set to a positive number. guess there is the right entry in People...

It is not easy for the user to remember the right order. While debugging one may wish to flush all tables and repopulate so this will not work... What happens then?

KatoStoelen commented 11 years ago

_ID_PEOPLE in the Me table is set when you add a Box account, given that a person with the specified email address already exists in the People table.

JacquelineFloch commented 11 years ago

Yes I understand that, but I mean it is not user friendly. I wonder also what happens when populateUbiShare is run a second time to flush the tables (debug).

JacquelineFloch commented 11 years ago

I have added a work around in my App. I check consistency between Me and People and update _ID_PEOPLE in Me if not consistent with Me. At the moment I use a match with account name with EMAIL because the name field in Me is not the "user name" as used in people. This is a bit tricky... I hve another comment otherwise about overlap between these table...

tcarlyle commented 11 years ago

As per Kato's comment, if you follow this order:

The ME table will be synchronized with your people id. In that way there is no need for workaround. Just tested it here

JacquelineFloch commented 11 years ago

Yes, but a problem I notice, if I Refresh the DB, the persons added to people get a new _ID and thus Me._ID_PEOPLE should be updated. I now do a check in my App that the tables are consistent, and update Me._ID_PEOPLE (I do a match on People.EMAIL). SO it is important the user has the same email for box and in People...

BabakFarshchian commented 11 years ago

I agree this is not user-friendly. This is something that needs to be done in social provider. I suggest that the code Jacqueline has in her app moves to social provider so that it can check upon startup whether the _ID_PEOPLE has changed. This will not only happen when using populate app. it might also happen if the user deletes and adds his own entry in People for other reasons.

I guess this is not so critical now. I move it to version 0.5 for now and add it later.