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 2024-02-07] [$500] IOU - Options missing from context menu when long tap IOU report #35244

Closed
4 of 6 tasks
kbecciv opened this issue Jan 26, 2024 · 21 comments
Closed
4 of 6 tasks
Assignees
Labels
Awaiting Payment Auto-added when associated PR is deployed to production Daily KSv2 Engineering External Added to denote the issue can be worked on by a contributor

Comments

@kbecciv
Copy link

kbecciv commented Jan 26, 2024

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


Version Number: 1.4.32-2
Reproducible in staging?: y
Reproducible in production?: n
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
Expensify/Expensify Issue URL:
Issue reported by: Applause - Internal Team
Slack conversation:

Action Performed:

  1. Open the app and log in
  2. Open any chat
  3. Tap the "+" button > Request money
  4. Enter the amount and send the request
  5. Tap the IOU preview
  6. Long tap the IOU report

Expected Result:

All menu options are displayed

Actual Result:

"Reply in thread", "Edit request", "Join thread" and "Delete request" are missing from the context menu. All menu options are shown if I tap the space next to the IOU report

Workaround:

Unknown

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

Bug6355735_1706271564870.video_2024-01-26_07-18-43.mp4

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~0162812b157c77d0a5
  • Upwork Job ID: 1751344574990077952
  • Last Price Increase: 2024-01-27
  • Automatic offers:
    • bernhardoj | Contributor | 28125971
    • hoangzinh | Contributor | 28127215
@kbecciv kbecciv added the DeployBlockerCash This issue or pull request should block deployment label Jan 26, 2024
Copy link
Contributor

👋 Friendly reminder that deploy blockers are time-sensitive ⏱ issues! Check out the open `StagingDeployCash` deploy checklist to see the list of PRs included in this release, then work quickly to do one of the following:

  1. Identify the pull request that introduced this issue and revert it.
  2. Find someone who can quickly fix the issue.
  3. Fix the issue yourself.

Copy link

melvin-bot bot commented Jan 26, 2024

Triggered auto assignment to @srikarparsi (Engineering), see https://stackoverflowteams.com/c/expensify/questions/9980/ for more details.

@kbecciv
Copy link
Author

kbecciv commented Jan 26, 2024

We think that this bug might be related to #vip-bills
CC @davidcardoza

@kbecciv
Copy link
Author

kbecciv commented Jan 26, 2024

Issue is not reproducible in production

Bug6355735_1706271564839.prod.mp4

@bernhardoj
Copy link
Contributor

Proposal

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

There are some missing menus when long pressing an IOU preview.

What is the root cause of that problem?

This happens after #34011. In #34011, we start passing the correct chatReportID to MoneyRequestAction.

<MoneyRequestAction
// If originalMessage.iouReportID is set, this is a 1:1 money request in a DM chat whose reportID is props.report.chatReportID
chatReportID={originalMessage.IOUReportID ? props.report.chatReportID : props.report.reportID}

However, we have an old code that relies on the wrong code.

const showContextMenu = (event) => {
showContextMenuForReport(event, props.contextMenuAnchor, props.chatReportID, props.action, props.checkIfContextMenuActive);
};

chatReportID is the report ID of the chat that the IOU belongs to. Previously, chatReportID was the IOU report id itself (wrong).

showContextMenuForReport expects the report ID that we pass is the current report ID.

function showContextMenuForReport(
event: GestureResponderEvent | MouseEvent,
anchor: RNText | null,
reportID: string,

But because chatReportID is not the current report ID, some menus are missing and it's because it can't find the report action from the report actions collection.

const reportAction: OnyxEntry<ReportAction> = useMemo(() => {
if (isEmptyObject(reportActions) || reportActionID === '0') {
return null;
}
return reportActions[reportActionID] ?? null;
}, [reportActions, reportActionID]);

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

Update the old code to use the correct report ID.

props.iouReportID || props.chatReportID

But iouReportID has a default value of '0', so we need to make it an empty string.

const iouReportID = originalMessage.IOUReportID ? originalMessage.IOUReportID.toString() : '0';

What alternative solutions did you explore? (Optional)

Or we can pass a new props called reportID alongside chatReportID and iouReportID that the value will always be the current report reportID and pass it to showContextMenuForReport.

@srikarparsi
Copy link
Contributor

This proposal looks good to me, are you able to work on a PR @bernhardoj?

@bernhardoj
Copy link
Contributor

@srikarparsi I'm available now

@srikarparsi
Copy link
Contributor

Cool, assigning you to the issue

@srikarparsi srikarparsi added the External Added to denote the issue can be worked on by a contributor label Jan 27, 2024
Copy link

melvin-bot bot commented Jan 27, 2024

Job added to Upwork: https://www.upwork.com/jobs/~0162812b157c77d0a5

@melvin-bot melvin-bot bot changed the title IOU - Options missing from context menu when long tap IOU report [$500] IOU - Options missing from context menu when long tap IOU report Jan 27, 2024
@melvin-bot melvin-bot bot added the Help Wanted Apply this label when an issue is open to proposals by contributors label Jan 27, 2024
Copy link

melvin-bot bot commented Jan 27, 2024

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

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

melvin-bot bot commented Jan 27, 2024

📣 @bernhardoj 🎉 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 📖

@bernhardoj
Copy link
Contributor

@srikarparsi PR is ready

@srikarparsi
Copy link
Contributor

PR in review by @hoangzinh

Copy link

melvin-bot bot commented Jan 28, 2024

📣 @hoangzinh 🎉 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 Weekly KSv2 Awaiting Payment Auto-added when associated PR is deployed to production and removed Weekly KSv2 labels Jan 29, 2024
@melvin-bot melvin-bot bot changed the title [$500] IOU - Options missing from context menu when long tap IOU report [HOLD for payment 2024-02-05] [$500] IOU - Options missing from context menu when long tap IOU report Jan 29, 2024
@melvin-bot melvin-bot bot removed the Reviewing Has a PR in review label Jan 29, 2024
Copy link

melvin-bot bot commented Jan 29, 2024

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

Copy link

melvin-bot bot commented Jan 29, 2024

The solution for this issue has been 🚀 deployed to production 🚀 in version 1.4.32-5 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 2024-02-05. 🎊

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

@francoisl francoisl removed the DeployBlockerCash This issue or pull request should block deployment label Jan 29, 2024
@melvin-bot melvin-bot bot added Weekly KSv2 and removed Weekly KSv2 labels Jan 31, 2024
@melvin-bot melvin-bot bot changed the title [HOLD for payment 2024-02-05] [$500] IOU - Options missing from context menu when long tap IOU report [HOLD for payment 2024-02-07] [HOLD for payment 2024-02-05] [$500] IOU - Options missing from context menu when long tap IOU report Jan 31, 2024
Copy link

melvin-bot bot commented Jan 31, 2024

The solution for this issue has been 🚀 deployed to production 🚀 in version 1.4.33-5 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 2024-02-07. 🎊

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

@melvin-bot melvin-bot bot added Daily KSv2 and removed Weekly KSv2 labels Feb 5, 2024
Copy link

melvin-bot bot commented Feb 7, 2024

Issue is ready for payment but no BZ is assigned. @lschurr you are the lucky winner! Please verify the payment summary looks correct and complete the checklist. Thanks!

@melvin-bot melvin-bot bot added the Overdue label Feb 7, 2024
@lschurr
Copy link
Contributor

lschurr commented Feb 7, 2024

Not overdue. This is will be reviewed and paid today.

@melvin-bot melvin-bot bot removed the Overdue label Feb 7, 2024
@lschurr lschurr changed the title [HOLD for payment 2024-02-07] [HOLD for payment 2024-02-05] [$500] IOU - Options missing from context menu when long tap IOU report [HOLD for payment 2024-02-07] [$500] IOU - Options missing from context menu when long tap IOU report Feb 7, 2024
@lschurr
Copy link
Contributor

lschurr commented Feb 7, 2024

Payment summary:

@lschurr
Copy link
Contributor

lschurr commented Feb 7, 2024

This is complete.

@lschurr lschurr closed this as completed Feb 7, 2024
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 Daily KSv2 Engineering External Added to denote the issue can be worked on by a contributor
Projects
None yet
Development

No branches or pull requests

7 participants