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

[ON-HOLD Payment 4/16] [$500] Android/iOS - Chat - New chat shows time zone for Unvalidated Accounts #38581

Closed
2 of 6 tasks
kbecciv opened this issue Mar 19, 2024 · 61 comments
Closed
2 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 Mar 19, 2024

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


Version Number: 1.4.54.0
Reproducible in staging?: y
Reproducible in production?: y
If this was caught during regression testing, add the test name, ID and link from TestRail: https://expensify.testrail.io/index.php?/tests/view/4434326
Issue reported by: Applause - Internal Team

Action Performed:

  1. Launch app (used gmail)
  2. Tap fab --- start chat
  3. Enter 9894706467/+19894706461 (use non-existing local number
  4. From suggestions, select the contact
  5. Tap on the header

Expected Result:

New chat must not show time zone.

Actual Result:

User is not part of same private workspace/domain nor had sent a DM, yet time zone showing in details page for unvalidated accounts.

New chat shows time zone.

Workaround:

n/a

Platforms:

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

  • Android: Native
  • Android: mWeb Chrome
  • iOS: Native
  • iOS: mWeb Safari
  • MacOS: Chrome / Safari
  • MacOS: Desktop

Screenshots/Videos

Add any screenshot/video evidence

image

Bug6418748_1710821663189.hi.mp4

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~01ebbabe514d6a178d
  • Upwork Job ID: 1770142743565381632
  • Last Price Increase: 2024-03-19
  • Automatic offers:
    • mollfpr | Reviewer | 0
    • GandalfGwaihir | Contributor | 0
@kbecciv kbecciv added Daily KSv2 Bug Something is broken. Auto assigns a BugZero manager. labels Mar 19, 2024
Copy link

melvin-bot bot commented Mar 19, 2024

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

@kbecciv
Copy link
Author

kbecciv commented Mar 19, 2024

We think that this bug might be related to #vip-vsb

@kbecciv
Copy link
Author

kbecciv commented Mar 19, 2024

@CortneyOfstad I haven't added the External label as I wasn't 100% sure about this issue. Please take a look and add the label if you agree it's a bug and can be handled by external contributors.

@Krishna2323
Copy link
Contributor

Krishna2323 commented Mar 19, 2024

Proposal

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

Android - Chat - New chat shows time zone.

What is the root cause of that problem?

We don't use canShowReportRecipientLocalTime for checking if to show local time or not.

const shouldShowLocalTime = !ReportUtils.hasAutomatedExpensifyAccountIDs([accountID]) && !isEmptyObject(timezone);

We do have a check in ReportActionCompose.
const shouldShowReportRecipientLocalTime = useMemo(
() => ReportUtils.canShowReportRecipientLocalTime(personalDetails, report, currentUserPersonalDetails.accountID) && !isComposerFullSize,
[personalDetails, report, currentUserPersonalDetails.accountID, isComposerFullSize],
);

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

Add a check for canShowReportRecipientLocalTime also.

    const currentUserPersonalDetails = useCurrentUserPersonalDetails();

    const shouldShowLocalTime =
        !ReportUtils.hasAutomatedExpensifyAccountIDs([accountID]) &&
        !isEmptyObject(timezone) &&
        ReportUtils.canShowReportRecipientLocalTime(personalDetails, report, currentUserPersonalDetails.accountID);

We might also want to hide other fields like pronouns.

Result

Alternatively

Show local time above composer also.

@Krishna2323
Copy link
Contributor

Proposal updated

@hayes102
Copy link

Don't think this is a bug actually

Copy link

melvin-bot bot commented Mar 19, 2024

📣 @hayes102! 📣
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. Make sure you've read and understood the contributing guidelines.
  2. 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.
  3. 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.
  4. 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>

@CortneyOfstad
Copy link
Contributor

@kbecciv This is not a bug. We show timezones by default so people are aware of what time it is for the person they attempt to message. This is not personal information, and only provides a very broad location of where that person is at the moment the message is sent.

Going to close this 👍

@Krishna2323
Copy link
Contributor

@CortneyOfstad, but why do we hide the local time above the composer than? Just want to confirm because we did intentionally hide the localtime above the composer.

@CortneyOfstad
Copy link
Contributor

@Krishna2323 can you clarify what you mean by "the composer"? Sorry for the confusion on my part!

@CortneyOfstad
Copy link
Contributor

@Krishna2323 I did some additional testing on this, and realized the "composer" refers to the text box — so all good there.

However, I am surprised that we would hide that information, as it is not private by any means. I'm going to bring this to the room to discuss further and will follow up 👍

@CortneyOfstad CortneyOfstad reopened this Mar 19, 2024
@CortneyOfstad
Copy link
Contributor

Post in #VIP-VSB is here

@allgandalf
Copy link
Contributor

We had a issue few weeks back which actually made all this data public, so maybe closing this bug is a choice, I will link the issue if i find it :)

@Piyush-Desai
Copy link

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

Copy link

melvin-bot bot commented Mar 19, 2024

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

@CortneyOfstad CortneyOfstad changed the title Android - Chat - New chat shows time zone. Android - Chat - New chat shows time zone for Unvalidated Accounts Mar 19, 2024
@CortneyOfstad CortneyOfstad changed the title Android - Chat - New chat shows time zone for Unvalidated Accounts Android/iOS - Chat - New chat shows time zone for Unvalidated Accounts Mar 19, 2024
@CortneyOfstad CortneyOfstad added External Added to denote the issue can be worked on by a contributor Help Wanted Apply this label when an issue is open to proposals by contributors labels Mar 19, 2024
Copy link

melvin-bot bot commented Mar 19, 2024

Job added to Upwork: https://www.upwork.com/jobs/~01ebbabe514d6a178d

@melvin-bot melvin-bot bot changed the title Android/iOS - Chat - New chat shows time zone for Unvalidated Accounts [$500] Android/iOS - Chat - New chat shows time zone for Unvalidated Accounts Mar 19, 2024
Copy link

melvin-bot bot commented Mar 19, 2024

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

@CortneyOfstad
Copy link
Contributor

Thanks for your patience! So after a deeper discussion with @puneetlath and @quinthar, we found that the scope of the issue is different that we originally thought.

We're showing timezones for unvalidated accounts per this:

image_720

I've adjusted the main comment above (just a heads up @kbecciv) and changed this to reflect that it also shows in iOS, as well as Android 👍

We would like to hide the timezone for unvalidated accounts to maintain consistency, as we do above the compose tool.

@Krishna2323 feel free to adjust your proposal to reflect this (if needed) and we can get this reviewed. Thank you!

@mollfpr
Copy link
Contributor

mollfpr commented Mar 27, 2024

I might have overlooked the issue of using canShowReportRecipientLocalTime; the function seems intended for the chat report only and used over the composer.

@aldo-expensify We can go with @GandalfGwaihir's proposal for simplicity.

@Krishna2323
Copy link
Contributor

@mollfpr I'm not sure why we can't use canShowReportRecipientLocalTime. Have you found any case that it will fail? WDYT about #38581 (comment).

@mollfpr
Copy link
Contributor

mollfpr commented Mar 27, 2024

@Krishna2323 I don’t have any case in mind, but since the issue is on the profile detail page, it is not necessary to have a check for a report.

@Krishna2323
Copy link
Contributor

@mollfpr @aldo-expensify, I was looking for a case where my solution fails and found it does fail on workspace members page. You can assign @GandalfGwaihir here.

@aldo-expensify
Copy link
Contributor

Thanks @Krishna2323 for checking, and sorry for the slow replies, I'm quite busy with other high priority stuff for the moment. I'll assign @GandalfGwaihir then.

@melvin-bot melvin-bot bot removed the Help Wanted Apply this label when an issue is open to proposals by contributors label Mar 27, 2024
Copy link

melvin-bot bot commented Mar 27, 2024

📣 @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

Copy link

melvin-bot bot commented Mar 27, 2024

📣 @GandalfGwaihir 🎉 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 melvin-bot bot added the Overdue label Apr 1, 2024
@CortneyOfstad
Copy link
Contributor

@GandalfGwaihir any update on the PR progress? Thanks!

@melvin-bot melvin-bot bot removed the Overdue label Apr 1, 2024
@allgandalf
Copy link
Contributor

Would be up before EOD today, sorry for the delay...

@CortneyOfstad
Copy link
Contributor

@mollfpr — PR is ready for your review — thanks!

@CortneyOfstad
Copy link
Contributor

Launched to staging yesterday!

@CortneyOfstad CortneyOfstad added Awaiting Payment Auto-added when associated PR is deployed to production and removed Reviewing Has a PR in review labels Apr 11, 2024
@CortneyOfstad
Copy link
Contributor

Production 20 hours ago!

@CortneyOfstad CortneyOfstad changed the title [$500] Android/iOS - Chat - New chat shows time zone for Unvalidated Accounts [ON-HOLD Payment 4/16] [$500] Android/iOS - Chat - New chat shows time zone for Unvalidated Accounts Apr 11, 2024
@melvin-bot melvin-bot bot added the Overdue label Apr 15, 2024
@CortneyOfstad
Copy link
Contributor

Payment is set for tomorrow, so not overdue!

@melvin-bot melvin-bot bot removed the Overdue label Apr 15, 2024
@mollfpr
Copy link
Contributor

mollfpr commented Apr 16, 2024

[@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.

[@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:

The regression step 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. Start a new chat with the invalidated account (e.g., 9894706467/+19894706461)
  2. Open the profile of the account
  3. Verify the local time of the account is not showing
  4. Open a chat that already had a conversation
  5. Open the profile of the account
  6. Verify the local time is showing
  7. 👍 or 👎

@CortneyOfstad Could you create the payment summary? Thank you!

@CortneyOfstad
Copy link
Contributor

Payment Summary

@GandalfGwaihir — paid $500 via Upwork
@mollfpr — to be paid $500 via NewDot

@CortneyOfstad
Copy link
Contributor

Regression test created here — closing!

@JmillsExpensify
Copy link

$500 approved for @mollfpr

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
No open projects
Status: CRITICAL
Development

No branches or pull requests

10 participants