Skip to content
This repository has been archived by the owner on Feb 8, 2018. It is now read-only.

merging accounts doesn't move Balanced account #818

Closed
chadwhitacre opened this issue Apr 4, 2013 · 13 comments
Closed

merging accounts doesn't move Balanced account #818

chadwhitacre opened this issue Apr 4, 2013 · 13 comments

Comments

@chadwhitacre
Copy link
Contributor

Reported by @latentflip in private email.

  • Attach a Balanced account to a Gittip account
  • Merge that Gittip account into another Gittip account (by reconnecting the last account elsewhere from the old Gittip account to the new Gittip account)

Expected: The Balanced account is reconnected to the new Gittip account.

Actual: The Balanced account is stuck on the old Gittip account.

Per the following query, 10 accounts are thus affected.

select participants.id, balanced_account_uri
  from participants join absorptions on participants.id=archived_as
 where balanced_account_uri is not null;
@chadwhitacre
Copy link
Contributor Author

And per this query, four of the ten have since set up new(?) Balanced accounts:

select id, balanced_account_uri
  from participants
 where id in ( select absorbed_by
                 from participants join absorptions on participants.id=archived_as
                where balanced_account_uri is not null
              );

@chadwhitacre
Copy link
Contributor Author

These two queries give me a good comparison:

select absorbed_by, absorbed_was, archived_as, balanced_account_uri from participants join absorptions on participants.username=archived_as where balanced_account_uri is not null order by absorbed_by;
select username, balanced_account_uri from participants where username in (select absorbed_by from participants join absorptions on participants.username=archived_as where balanced_account_uri is not null) order by username;

The four that still have Balanced accounts do indeed have new Balanced accounts.

@chadwhitacre
Copy link
Contributor Author

Here's the plan I'm considering:

  • Leave the four who have already reconnected their accounts untouched.
  • Move over the Balanced accounts for the six currently in the lurch.
  • Modify the merge workflow to take Balanced accounts into account.

Questions:

  • Should we make an attempt to delete the old Balanced accounts for the four in question, or at least invalidate the associated accounts?
  • Are we absolutely sure that we're not going to be connecting Balanced accounts to the wrong people?

@chadwhitacre
Copy link
Contributor Author

Are we absolutely sure that we're not going to be connecting Balanced accounts to the wrong people?

Yes. If we're moving it from archived_as to absorbed_by then (assuming no bugs in the archiving code) we're guaranteed its the right person.

@chadwhitacre
Copy link
Contributor Author

I've repaired the database for the seven participants currently affected:

@carljm @dianaclarke @garnaat @hotsyk @JerrySievert @latentflip @tisto

@hotsyk
Copy link

hotsyk commented Apr 11, 2013

@whit537 : but backed card is not merged with new account?

@chadwhitacre
Copy link
Contributor Author

@hotsyk You mean because it says "Credit Card: X"? That should reset after this payday is done (currently running). That's based on last_bill_result in the participants table, which should get updated when we try to charge your card during this payday. Let's revisit in a few minutes ...

@hotsyk
Copy link

hotsyk commented Apr 11, 2013

@whit537 no, actually after I merged accounts, I have no credit card saved more. So, originally I was signed in with github and had credit card saved. After, I signed with twitter and merged new account with my old account. Now I have no credit card and not sure if paymens are going through. Sorry, if it is incorrect place to write, probably this is another issue, not related with current one but I am not sure

@chadwhitacre
Copy link
Contributor Author

@hotsyk Yeah, looks like a new issue. Reticketed as #839.

@chadwhitacre
Copy link
Contributor Author

I changed the review dashboard to show more people, including those affected here. I reviewed them and charges appear to have gone through as intended this week.

@zbynekwinkler
Copy link
Contributor

Why is this closed? Take over still does not do anything with balanced_uri.

@chadwhitacre
Copy link
Contributor Author

@zwn Looks like I closed this as a dupe of #941 (comment).

@chadwhitacre
Copy link
Contributor Author

... so let's pick up over there, I guess.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants