Skip to content

[HOLD for payment 2023-08-07] [$1000] Web - Incorrect timezone with new account #23479

Closed

Description

@kbecciv

If you haven’t already, check out our contributing guidelines for onboarding and email contributors@expensify.com to request to join our Slack channel!


Action Performed:

Pre-conditon: Your time zone must different PDT

  1. Go login page
  2. Login with new account
  3. Chat any message
  4. Click your avatar in a message, observe that the timezone displayed on the profile page and the timezone of the device are different

Expected Result:

The timezone on the profile page must be the same as the device's timezone

Actual Result:

Timezone displayed on the profile page show time PDT

Workaround:

Unknown

Platforms:

Which of our officially supported platforms is this issue occurring on?

  • Android / native
  • Android / Chrome
  • iOS / native
  • iOS / Safari
  • MacOS / Chrome / Safari
  • MacOS / Desktop

Version Number: 1.3.44-0
Reproducible in staging?: n/a
Reproducible in production?: n/a
If this was caught during regression testing, add the test name, ID and link from TestRail:
Email or phone of affected tester (no customers):
Logs: https://stackoverflow.com/c/expensify/questions/4856
Notes/Photos/Videos: Any additional supporting documentation

Screen.Recording.2023-07-23.at.17.45.43.mov

Expensify/Expensify Issue URL:
Issue reported by: @namhihi237
Slack conversation: https://expensify.slack.com/archives/C049HHMV9SM/p1690109502862679

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~01044ba0c87324c5d3
  • Upwork Job ID: 1683851349929447424
  • 2023-07-25
  • Automatic offers:
    • mollfpr | Reviewer | 25759115
    • namhihi237 | Contributor | 25759119
    • namhihi237 | Reporter | 25759120

Activity

  1. added
    BugSomething is broken. Auto assigns a BugZero manager.
    on Jul 24, 2023
  2. melvin-bot commented on Jul 24, 2023

    @melvin-bot

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

  3. melvin-bot commented on Jul 24, 2023

    @melvin-bot

    Bug0 Triage Checklist (Main S/O)

    • This "bug" occurs on a supported platform (ensure Platforms in OP are ✅)
    • This bug is not a duplicate report (check E/App issues and #expensify-bugs)
      • If it is, comment with a link to the original report, close the issue and add any novel details to the original issue instead
    • This bug is reproducible using the reproduction steps in the OP. S/O
      • If the reproduction steps are clear and you're unable to reproduce the bug, check with the reporter and QA first, then close the issue.
      • If the reproduction steps aren't clear and you determine the correct steps, please update the OP.
    • This issue is filled out as thoroughly and clearly as possible
      • Pay special attention to the title, results, platforms where the bug occurs, and if the bug happens on staging/production.
    • I have reviewed and subscribed to the linked Slack conversation to ensure Slack/Github stay in sync
  4. kbecciv commented on Jul 24, 2023

    @kbecciv
    Author

    QA team is not allow to chat with Concierge

  5. kbecciv commented on Jul 24, 2023

    @kbecciv
    Author

    Proposal

    by @namhihi237

    Please re-state the problem that we are trying to solve in this issue.

    The timezone on the profile page must be the same as the device's timezone

    What is the root cause of that problem?

    We have 2 things here:

    1. Since we migrated to using accountID, we missed here:
      So here it will be undefined
      timezone = lodashGet(val, [currentUserEmail, 'timezone'], {});

      This leads to not updating the timezone when the default login will be PDT from the backend returned.
      if (_.isObject(timezone) && timezone.automatic && timezone.selected !== currentTimezone) {
      timezone.selected = currentTimezone;
      PersonalDetails.updateAutomaticTimezone(timezone);
      }
      },
    2. In the case the user logout and login with a new account, the timezone here stored value previous, so when login the backend return timezone is PDT so it not update because here:
      let timezone;
      Onyx.connect({
      key: ONYXKEYS.PERSONAL_DETAILS_LIST,
      callback: (val) => {
      if (!val || timezone) {
      return;
      }

    What changes do you think we should make in order to solve the problem?

    1. Use accountID
    2. Clear timezone when logout here
    let currentAccountID;
    let timezone;
    Onyx.connect({
        key: ONYXKEYS.SESSION,
        callback: (val) => {
            // When signed out, val  hasn't accountID
            if (!_.has(val, 'accountID' )) {
                timezone = null;
                return;
            }
            currentAccountID = val.accountID;
        },
    });
    Onyx.connect({
           ...
            timezone = lodashGet(val, [currentAccountID, 'timezone'], {});
    

    What alternative solutions did you explore? (Optional)

    N/A

  6. added
    ExternalAdded to denote the issue can be worked on by a contributor
    and removed on Jul 25, 2023
  7. changed the title [-]Web - Incorrect timezone with new account[/-] [+][$1000] Web - Incorrect timezone with new account[/+] on Jul 25, 2023
  8. melvin-bot commented on Jul 25, 2023

    @melvin-bot
  9. added
    Help WantedApply this label when an issue is open to proposals by contributors
    on Jul 25, 2023
  10. melvin-bot commented on Jul 25, 2023

    @melvin-bot

    Current assignee @garrettmknight is eligible for the External assigner, not assigning anyone new.

  11. 29 remaining items

  12. melvin-bot commented on Jul 31, 2023

    @melvin-bot

    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:

    • [@mollfpr] The PR that introduced the bug has been identified. Link to the PR:
    • [@mollfpr] The offending PR has been commented on, pointing out the bug it caused and why, so the author and reviewers can learn from the mistake. Link to comment:
    • [@mollfpr] A discussion in #expensify-bugs has been started about whether any other steps should be taken (e.g. updating the PR review checklist) in order to catch this type of bug sooner. Link to discussion:
    • [@mollfpr] Determine if we should create a regression test for this bug.
    • [@mollfpr] If we decide to create a regression test for the bug, please propose the regression test steps to ensure the same bug will not reach production again.
    • [@garrettmknight] Link the GH issue for creating/updating the regression test once above steps have been agreed upon:
  13. garrettmknight commented on Aug 7, 2023

    @garrettmknight
    Contributor

    @mollfpr can you work through the checklist? I'll pay out the rest of the issue now and when you're done with the list I'll tee your payment up.

  14. mollfpr commented on Aug 7, 2023

    @mollfpr
    Contributor

    The PR is eligible for bonus speed 🚀
    Assignment: Jul 26 GMT+7
    PR merged: Jul 27 GMT+7

    [@mollfpr] The PR that introduced the bug has been identified. Link to the PR:
    [@mollfpr] The offending PR has been commented on, pointing out the bug it caused and why, so the author and reviewers can learn from the mistake. Link to comment:

    No offending PR. This issue appears due to the migration on accountID.

    [@mollfpr] A discussion in #expensify-bugs has been started about whether any other steps should be taken (e.g. updating the PR review checklist) in order to catch this type of bug sooner. Link to discussion:

    This is a one-time bug, so the regression test should be enough.

    [@mollfpr] Determine if we should create a regression test for this bug.
    [@mollfpr] If we decide to create a regression test for the bug, please propose the regression test steps to ensure the same bug will not reach production again.

    1. Open the App
    2. Login with a new account
    3. Open a new chat and send any message
    4. Click your avatar in a message
    5. Verify that the timezone displayed on the profile page and the timezone of the device are the same
    6. 👍 or 👎
  15. garrettmknight commented on Aug 8, 2023

    @garrettmknight
    Contributor

    Summarizing payments for this issue:

    • #urgency bonus? Yes
    • Reporter: @namhihi237 $250 paid via Upwork
    • Contributor: @namhihi237 $1500 paid via Upwork
    • Contributor+: @mollfpr $1500 paid via Upwork

    Upwork job is here: https://www.upwork.com/jobs/~01044ba0c87324c5d3

  16. garrettmknight commented on Aug 14, 2023

    @garrettmknight
  17. mollfpr commented on Aug 18, 2023

    @mollfpr
    Contributor

    @garrettmknight I'm still not in the beta to receive payment in ND. So, we can stick with the Upwork for now.

  18. garrettmknight commented on Aug 18, 2023

    @garrettmknight
    Contributor

    Ah, cool. You've been paid and I've updated the comment.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

Awaiting PaymentAuto-added when associated PR is deployed to productionBugSomething is broken. Auto assigns a BugZero manager.DailyKSv2ExternalAdded to denote the issue can be worked on by a contributor

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions