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

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

Closed
1 of 6 tasks
kbecciv opened this issue Jul 24, 2023 · 31 comments
Closed
1 of 6 tasks
Assignees
Labels
Awaiting Payment Auto-added when associated PR is deployed to production Bug Something is broken. Auto assigns a BugZero manager. Daily KSv2 External Added to denote the issue can be worked on by a contributor

Comments

@kbecciv
Copy link

kbecciv commented Jul 24, 2023

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:

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
@kbecciv kbecciv added Daily KSv2 Needs Reproduction Reproducible steps needed Bug Something is broken. Auto assigns a BugZero manager. labels Jul 24, 2023
@melvin-bot
Copy link

melvin-bot bot commented Jul 24, 2023

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

@melvin-bot
Copy link

melvin-bot bot commented Jul 24, 2023

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

@kbecciv
Copy link
Author

kbecciv commented Jul 24, 2023

QA team is not allow to chat with Concierge

@kbecciv
Copy link
Author

kbecciv commented Jul 24, 2023

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

@garrettmknight garrettmknight added External Added to denote the issue can be worked on by a contributor and removed Needs Reproduction Reproducible steps needed labels Jul 25, 2023
@melvin-bot melvin-bot bot changed the title Web - Incorrect timezone with new account [$1000] Web - Incorrect timezone with new account Jul 25, 2023
@melvin-bot
Copy link

melvin-bot bot commented Jul 25, 2023

Job added to Upwork: https://www.upwork.com/jobs/~01044ba0c87324c5d3

@melvin-bot melvin-bot bot added the Help Wanted Apply this label when an issue is open to proposals by contributors label Jul 25, 2023
@melvin-bot
Copy link

melvin-bot bot commented Jul 25, 2023

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

@melvin-bot
Copy link

melvin-bot bot commented Jul 25, 2023

Triggered auto assignment to Contributor-plus team member for initial proposal review - @mollfpr (External)

@mollfpr
Copy link
Contributor

mollfpr commented Jul 25, 2023

Thank @namhihi237

I agree with both cases. The proposal from @namhihi237 looks good to me 🚀

🎀 👀 🎀 C+ reviewed!

@melvin-bot
Copy link

melvin-bot bot commented Jul 25, 2023

Triggered auto assignment to @Beamanator, see https://stackoverflow.com/c/expensify/questions/7972 for more details.

@ghost
Copy link

ghost commented Jul 25, 2023

Can I submit a proposal ?

@mollfpr
Copy link
Contributor

mollfpr commented Jul 25, 2023

@AnshuAgarwal24 I guess you can if you think the above proposal is not the correct solution and we haven't received the internal engineer's review.

@gulxarahmad
Copy link

Hello Expensify Team,

I have reviewed the GitHub issue (#23479) regarding the incorrect timezone with new accounts in the Expensify React Native app. I'm confident that I can help resolve this issue efficiently and effectively.

Technical Explanation:

After analyzing the issue, I have identified that the incorrect timezone is likely due to a misconfiguration in the client-side handling of timezones. To fix this problem, I propose the following steps:

Identify the Source of the Problem: I will thoroughly investigate the codebase to pinpoint the areas where timezone data is being handled. This will allow me to understand the root cause of the incorrect timezone issue.

Implement Timezone Management: I will integrate a reliable and robust timezone management library for React Native to ensure consistent handling of timezones across different platforms. The library will accurately determine the user's timezone and handle any conversions necessary to display time correctly.

Data Consistency Checks: I will implement data consistency checks on the server-side to ensure that the correct timezone data is being received and processed from the client-side. This step will help in verifying that the issue is resolved and prevent future occurrences.

Comprehensive Testing: Before submitting the code for review, I will conduct extensive testing on all relevant platforms (iOS, Android, and Web) to ensure that the fix works seamlessly without introducing any regressions. I will provide screenshots as proof of testing and validation.

Timeline and Payment:

I fully understand and agree to the payment timelines based on the day my proposal is accepted and I am assigned to the GitHub issue:

Merged PR within 3 business days: I will aim to deliver a swift resolution and receive a 50% bonus for meeting the quick turnaround time.
Contributor Guidelines:

I have reviewed the Expensify Contributor Guidelines and will adhere to them throughout the development process. I am committed to maintaining code quality, following best practices, and engaging in effective communication with the team.

About Me:

I am an experienced React Native developer with a strong background in building cross-platform applications. I have successfully resolved similar issues in other projects and have a deep understanding of time handling in JavaScript and React Native.

Conclusion:

I'm excited to contribute my skills and expertise to solve the incorrect timezone issue in the Expensify React Native app. Please feel free to reach out to me if you have any questions or need further clarification on my proposal.

Looking forward to the opportunity to work together.

Best regards,

@melvin-bot
Copy link

melvin-bot bot commented Jul 25, 2023

📣 @gulxarahmad! 📣
Hey, it seems we don’t have your contributor details yet! You'll only have to do this once, and this is how we'll hire you on Upwork.
Please follow these steps:

  1. Get the email address used to login to your Expensify account. If you don't already have an Expensify account, create one here. If you have multiple accounts (e.g. one for testing), please use your main account email.
  2. Get the link to your Upwork profile. It's necessary because we only pay via Upwork. You can access it by logging in, and then clicking on your name. It'll look like this. If you don't already have an account, sign up for one here.
  3. Copy the format below and paste it in a comment on this issue. Replace the placeholder text with your actual details.
    Screen Shot 2022-11-16 at 4 42 54 PM
    Format:
Contributor details
Your Expensify account email: <REPLACE EMAIL HERE>
Upwork Profile Link: <REPLACE LINK HERE>

@gulxarahmad
Copy link

Contributor details
Your Expensify account email: [email protected]
Upwork Profile Link: https://www.upwork.com/freelancers/gulzara12

@melvin-bot
Copy link

melvin-bot bot commented Jul 25, 2023

✅ Contributor details stored successfully. Thank you for contributing to Expensify!

@Beamanator
Copy link
Contributor

@namhihi237 can you please post in this issue so that I can assign this job to you? Your proposal looks great, but I can't assign you until you post here (GH restrictions)

@Beamanator
Copy link
Contributor

@gulxarahmad thanks for your proposal and welcome to the expensify open source community! :) IT looks like you haven't yet thoroughly read our guidelines for proposing solutions to bugs. Please do that, and if you have any questions about the process, feel free to ask in our slack channels (#expensify-open-source or #expensify-bugs) 👍

@namhihi237
Copy link
Contributor

namhihi237 commented Jul 26, 2023

Thanks, @Beamanator , I think with a comment and you can assign me.

@melvin-bot melvin-bot bot removed the Help Wanted Apply this label when an issue is open to proposals by contributors label Jul 26, 2023
@melvin-bot
Copy link

melvin-bot bot commented Jul 26, 2023

📣 @mollfpr 🎉 An offer has been automatically sent to your Upwork account for the Reviewer role 🎉 Thanks for contributing to the Expensify app!

Offer link
Upwork job

@melvin-bot
Copy link

melvin-bot bot commented Jul 26, 2023

📣 @namhihi237 🎉 An offer has been automatically sent to your Upwork account for the Contributor role 🎉 Thanks for contributing to the Expensify app!

Offer link
Upwork job
Please accept the offer and leave a comment on the Github issue letting us know when we can expect a PR to be ready for review 🧑‍💻
Keep in mind: Code of Conduct | Contributing 📖

@melvin-bot
Copy link

melvin-bot bot commented Jul 26, 2023

📣 @namhihi237 🎉 An offer has been automatically sent to your Upwork account for the Reporter role 🎉 Thanks for contributing to the Expensify app!

Offer link
Upwork job

@melvin-bot melvin-bot bot added Reviewing Has a PR in review Weekly KSv2 and removed Daily KSv2 labels Jul 26, 2023
@namhihi237
Copy link
Contributor

Hi @mollfpr @Beamanator PR already for review. Please take a look. Thanks

@melvin-bot melvin-bot bot added Weekly KSv2 Awaiting Payment Auto-added when associated PR is deployed to production and removed Weekly KSv2 labels Jul 31, 2023
@melvin-bot melvin-bot bot changed the title [$1000] Web - Incorrect timezone with new account [HOLD for payment 2023-08-07] [$1000] Web - Incorrect timezone with new account Jul 31, 2023
@melvin-bot
Copy link

melvin-bot bot commented Jul 31, 2023

Reviewing label has been removed, please complete the "BugZero Checklist".

@melvin-bot melvin-bot bot removed the Reviewing Has a PR in review label Jul 31, 2023
@melvin-bot
Copy link

melvin-bot bot commented Jul 31, 2023

The solution for this issue has been 🚀 deployed to production 🚀 in version 1.3.47-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 2023-08-07. 🎊

After the hold period is over and BZ checklist items are completed, please complete any of the applicable payments for this issue, and check them off once done.

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

For reference, here are some details about the assignees on this issue:

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 Jul 31, 2023

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:

@melvin-bot melvin-bot bot added Daily KSv2 Overdue and removed Weekly KSv2 labels Aug 6, 2023
@garrettmknight
Copy link
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.

@melvin-bot melvin-bot bot removed the Overdue label Aug 7, 2023
@mollfpr
Copy link
Contributor

mollfpr commented Aug 7, 2023

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 👎

@garrettmknight
Copy link
Contributor

garrettmknight commented Aug 8, 2023

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

@garrettmknight

This comment was marked as outdated.

@melvin-bot melvin-bot bot removed the Overdue label Aug 14, 2023
@mollfpr
Copy link
Contributor

mollfpr commented Aug 18, 2023

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

@garrettmknight
Copy link
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
Labels
Awaiting Payment Auto-added when associated PR is deployed to production Bug Something is broken. Auto assigns a BugZero manager. Daily KSv2 External Added to denote the issue can be worked on by a contributor
Projects
None yet
Development

No branches or pull requests

7 participants