Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Log in - "Account closed successfully" message does not disappear until put your log in and click continue. #13506

Closed
kbecciv opened this issue Dec 10, 2022 · 12 comments
Assignees
Labels
Awaiting Payment Auto-added when associated PR is deployed to production Bug Something is broken. Auto assigns a BugZero manager. Daily KSv2 Engineering Improvement Item broken or needs improvement. Internal Requires API changes or must be handled by Expensify staff Reviewing Has a PR in review

Comments

@kbecciv
Copy link

kbecciv commented Dec 10, 2022

If you haven’t already, check out our contributing guidelines for onboarding and email [email protected] to request to join our Slack channel!


Action Performed:

  1. Launch App and login
  2. Navigate to security > Close account
  3. Enter your default contact method
  4. Tap on "Close account" button
    5.Confirm the "Account closed successfully" message displays correctly
  5. Start typing new email address under log in page

Expected Result:

"Account closed successfully" message should be disappear after start typing new email address

Actual Result:

"Account closed successfully" message does not disappear until put your log in and tap continue.

Workaround:

Unknown

Platform:

Where is this issue occurring?

  • Web
  • iOS
  • Android
  • Desktop App
  • Mobile Web

Version Number: 1.2.38.0

Reproducible in staging?: Yes

Reproducible in production?: No

Email or phone of affected tester (no customers):

Logs: https://stackoverflow.com/c/expensify/questions/4856

Notes/Photos/Videos: Any additional supporting documentation

Recording.1861.mp4

Expensify/Expensify Issue URL:

Issue reported by: Applause - Internal team

Slack conversation:

View all open jobs on GitHub

@kbecciv kbecciv added the DeployBlockerCash This issue or pull request should block deployment label Dec 10, 2022
@kbecciv
Copy link
Author

kbecciv commented Dec 10, 2022

Issue is not reproduced in production, attached video

Recording.1860.mp4

@markarmanus
Copy link
Contributor

Proposal:

Issue:

We set the onyx data for ONEXKEYS.FORMS.CLOSE_ACCOUNT_FORM to be true when the request succeds and we never reset its value.

Solution:
The same way we are reseting account errors when the user starts typing with this code.

        if (this.props.account.errors) {
            Session.clearAccountMessages();
        }

We do the same thing with the account close data.

We create this function which resets the data

function resetAccountCloseData() {
    Onyx.merge(ONYXKEYS.FORMS.CLOSE_ACCOUNT_FORM, CONST.DEFAULT_CLOSE_ACCOUNT_DATA);
}

Then we use that function on user input to the email field.

if (this.props.closeAccount.success) {
    Session.resetAccountCloseData();
}

Here is the full diff

diff --git a/src/libs/actions/Session/index.js b/src/libs/actions/Session/index.js
index 13f1eadc5..4dd01d52f 100644
--- a/src/libs/actions/Session/index.js
+++ b/src/libs/actions/Session/index.js
@@ -388,6 +388,9 @@ function clearAccountMessages() {
         isLoading: false,
     });
 }
+function resetAccountCloseData() {
+    Onyx.merge(ONYXKEYS.FORMS.CLOSE_ACCOUNT_FORM, CONST.DEFAULT_CLOSE_ACCOUNT_DATA);
+}
 
 /**
  * Calls change password and signs if successful. Otherwise, we request a new magic link
@@ -578,6 +581,7 @@ export {
     clearSignInData,
     cleanupSession,
     clearAccountMessages,
+    resetAccountCloseData,
     validateEmail,
     authenticatePusher,
     reauthenticatePusher,
diff --git a/src/pages/signin/LoginForm.js b/src/pages/signin/LoginForm.js
index e9813c3bf..bf6ec680b 100755
--- a/src/pages/signin/LoginForm.js
+++ b/src/pages/signin/LoginForm.js
@@ -111,6 +111,9 @@ class LoginForm extends React.Component {
         if (this.props.account.errors) {
             Session.clearAccountMessages();
         }
+        if (this.props.closeAccount.success) {
+            Session.resetAccountCloseData();
+        }
     }
 
     /**

Video:

Screen.Recording.2022-12-10.at.9.51.48.PM.mov

@melvin-bot melvin-bot bot added the Daily KSv2 label Dec 11, 2022
@mvtglobally mvtglobally added the Bug Something is broken. Auto assigns a BugZero manager. label Dec 11, 2022
@melvin-bot
Copy link

melvin-bot bot commented Dec 11, 2022

Triggered auto assignment to @mallenexpensify (Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details.

@Gonals Gonals added Internal Requires API changes or must be handled by Expensify staff Engineering Improvement Item broken or needs improvement. labels Dec 12, 2022
@Gonals
Copy link
Contributor

Gonals commented Dec 12, 2022

Grabbing this one for #urgency

@mallenexpensify
Copy link
Contributor

Thanks for snagging this @Gonals , I'm going to hang tight as BZ for now, let me know if you need help testing or anything.

@chiragsalian
Copy link
Contributor

Qa tested the CP PR and its a pass, removing deploy blocker label

@chiragsalian chiragsalian removed the DeployBlockerCash This issue or pull request should block deployment label Dec 13, 2022
@melvin-bot melvin-bot bot added Weekly KSv2 Awaiting Payment Auto-added when associated PR is deployed to production and removed Hourly KSv2 labels Dec 13, 2022
@melvin-bot melvin-bot bot changed the title Log in - "Account closed successfully" message does not disappear until put your log in and click continue. [HOLD for payment 2022-12-20] Log in - "Account closed successfully" message does not disappear until put your log in and click continue. Dec 13, 2022
@melvin-bot
Copy link

melvin-bot bot commented Dec 13, 2022

The solution for this issue has been 🚀 deployed to production 🚀 in version 1.2.38-6 and is now subject to a 7-day regression period 📆. Here is the list of pull requests that resolve this issue:

If no regressions arise, payment will be issued on 2022-12-20. 🎊

After the hold period, please check if any of the following need payment for this issue, and if so check them off after paying:

  • External issue reporter
  • Contributor that fixed the issue
  • Contributor+ that helped on the issue and/or PR

As a reminder, here are the bonuses/penalties that should be applied for any External issue:

  • Merged PR within 3 business days of assignment - 50% bonus
  • Merged PR more than 9 business days after assignment - 50% penalty

@melvin-bot
Copy link

melvin-bot bot commented Dec 13, 2022

BugZero Checklist: The PR fixing this issue has been merged! The following checklist (instructions) will need to be completed before the issue can be closed:

@melvin-bot melvin-bot bot added Weekly KSv2 and removed Weekly KSv2 labels Dec 15, 2022
@melvin-bot melvin-bot bot changed the title [HOLD for payment 2022-12-20] Log in - "Account closed successfully" message does not disappear until put your log in and click continue. [HOLD for payment 2022-12-22] [HOLD for payment 2022-12-20] Log in - "Account closed successfully" message does not disappear until put your log in and click continue. Dec 15, 2022
@melvin-bot

This comment was marked as duplicate.

@melvin-bot

This comment was marked as duplicate.

@melvin-bot melvin-bot bot added Daily KSv2 and removed Weekly KSv2 labels Dec 20, 2022
@mallenexpensify mallenexpensify changed the title [HOLD for payment 2022-12-22] [HOLD for payment 2022-12-20] Log in - "Account closed successfully" message does not disappear until put your log in and click continue. Log in - "Account closed successfully" message does not disappear until put your log in and click continue. Dec 24, 2022
@mallenexpensify
Copy link
Contributor

Testing to see if can close without checking boxes up top

@mallenexpensify
Copy link
Contributor

Looks like it, not sure need to address
#13506 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Awaiting Payment Auto-added when associated PR is deployed to production Bug Something is broken. Auto assigns a BugZero manager. Daily KSv2 Engineering Improvement Item broken or needs improvement. Internal Requires API changes or must be handled by Expensify staff Reviewing Has a PR in review
Projects
None yet
Development

No branches or pull requests

6 participants