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-04-15] [$500] IOU - Replace receipt option is available for requestee in combined IOU report #39436

Closed
6 tasks done
kbecciv opened this issue Apr 2, 2024 · 20 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 External Added to denote the issue can be worked on by a contributor

Comments

@kbecciv
Copy link

kbecciv commented Apr 2, 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.59-0
Reproducible in staging?: y
Reproducible in production?: n
Issue reported by: Applause - Internal Team

Action Performed:

  1. Go to staging.new.expensify.com
  2. [User A] Go to chat with User B that has no unsettled IOU.
  3. [User A] Request money from User B and attach a receipt.
  4. [User B] Go to combined IOU report with User A.
  5. [User B] Click on the receipt.
  6. [User B] Click 3-dot menu.

Expected Result:

There will be no Replace receipt option for User B (requestee).

Actual Result:

Replace receipt option is available for User B (requestee).
This issue only happens in combined IOU report.

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

Bug6435778_1712075771965.20240403_003243.mp4

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~01e259e1fb396c9678
  • Upwork Job ID: 1775695048648724480
  • Last Price Increase: 2024-04-04
@kbecciv kbecciv added the DeployBlockerCash This issue or pull request should block deployment label Apr 2, 2024
Copy link

melvin-bot bot commented Apr 2, 2024

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

Copy link
Contributor

github-actions bot commented Apr 2, 2024

👋 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.

@kbecciv
Copy link
Author

kbecciv commented Apr 2, 2024

We think that this bug might be related to #wave-collect - Release 1

@nkdengineer
Copy link
Contributor

Proposal

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

Replace receipt option is available for User B (requestee).
This issue only happens in combined IOU report.

What is the root cause of that problem?

When we open the receipt in combine report, the reportID in URL is the expense report so canEditReceipt check is wrong here because the parentReportAction now is the report preview action.

{({report}) => (
<PressableWithoutFocus
style={[styles.w100, styles.h100, styles.noOutline as ViewStyle]}
onPress={() => Navigation.navigate(ROUTES.TRANSACTION_RECEIPT.getRoute(report?.reportID ?? '', transaction?.transactionID ?? ''))}

const canEditReceipt = ReportUtils.canEditFieldOfMoneyRequest(parentReportAction, CONST.EDIT_REQUEST_FIELD.RECEIPT);

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

We should get the transactionReportID and pass it as reportID param of getRoute function here. So all check in TransactionReceiptPage will work well even if we open the receipt in combine report.

{({report}) => (
<PressableWithoutFocus
style={[styles.w100, styles.h100, styles.noOutline as ViewStyle]}
onPress={() => Navigation.navigate(ROUTES.TRANSACTION_RECEIPT.getRoute(report?.reportID ?? '', transaction?.transactionID ?? ''))}

To do that we should store transactionThreadReport or transactionThreadReportID in ShowContextMenuContext.

  1. Add transactionThreadReport in ShowContextMenuContextProps
type ShowContextMenuContextProps = {
    ...
    transactionThreadReport: OnyxEntry<Report>;
};

const ShowContextMenuContext = createContext<ShowContextMenuContextProps>({
    ...
    transactionThreadReport: null
});

type ShowContextMenuContextProps = {

  1. Store transactionThreadReport into contextValue here.

const contextValue = useMemo(

  1. Here, get transactionThreadReport and pass transactionThreadReport.reportID to getRoute function
{({report, transactionThreadReport}) => (
    <PressableWithoutFocus
        style={[styles.w100, styles.h100, styles.noOutline as ViewStyle]}
        onPress={() => Navigation.navigate(ROUTES.TRANSACTION_RECEIPT.getRoute(transactionThreadReport?.reportID ?? report?.reportID ?? '', transaction?.transactionID ?? ''))}
        accessibilityLabel={translate('accessibilityHints.viewAttachment')}
        accessibilityRole={CONST.ROLE.BUTTON}
    >
        <ReceiptImage {...propsObj} />
    </PressableWithoutFocus>
)}

{({report}) => (
<PressableWithoutFocus
style={[styles.w100, styles.h100, styles.noOutline as ViewStyle]}
onPress={() => Navigation.navigate(ROUTES.TRANSACTION_RECEIPT.getRoute(report?.reportID ?? '', transaction?.transactionID ?? ''))}

What alternative solutions did you explore? (Optional)

NA

This comment was marked as off-topic.

@jasperhuangg jasperhuangg added External Added to denote the issue can be worked on by a contributor Bug Something is broken. Auto assigns a BugZero manager. labels Apr 4, 2024
@melvin-bot melvin-bot bot changed the title IOU - Replace receipt option is available for requestee in combined IOU report [$500] IOU - Replace receipt option is available for requestee in combined IOU report Apr 4, 2024
Copy link

melvin-bot bot commented Apr 4, 2024

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

@melvin-bot melvin-bot bot added the Help Wanted Apply this label when an issue is open to proposals by contributors label Apr 4, 2024
Copy link

melvin-bot bot commented Apr 4, 2024

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

Copy link

melvin-bot bot commented Apr 4, 2024

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

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

melvin-bot bot commented Apr 4, 2024

📣 @nkdengineer You have been assigned to this job!
Please apply to the Upwork job and leave a comment on the Github issue letting us know when we can expect a PR to be ready for review 🧑‍💻
Once you apply to this job, your Upwork ID will be stored and you will be automatically hired for future jobs!
Keep in mind: Code of Conduct | Contributing 📖

@jasperhuangg
Copy link
Contributor

I don't think this is worth blocking deploy on this as we're marking other bugs related to the combined IOU report view as non-blockers.

@melvin-bot melvin-bot bot added Reviewing Has a PR in review Weekly KSv2 and removed Daily KSv2 labels Apr 4, 2024
@nkdengineer
Copy link
Contributor

@jasperhuangg The PR is here

@abdulrahuman5196
Copy link
Contributor

@jasperhuangg Wanted to check if C+ is needed here? Seems I was removed and deployment blocker is also removed?

@melvin-bot melvin-bot bot added Weekly KSv2 Awaiting Payment Auto-added when associated PR is deployed to production and removed Weekly KSv2 labels Apr 8, 2024
@melvin-bot melvin-bot bot changed the title [$500] IOU - Replace receipt option is available for requestee in combined IOU report [HOLD for payment 2024-04-15] [$500] IOU - Replace receipt option is available for requestee in combined IOU report Apr 8, 2024
Copy link

melvin-bot bot commented Apr 8, 2024

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

@melvin-bot melvin-bot bot removed the Reviewing Has a PR in review label Apr 8, 2024
Copy link

melvin-bot bot commented Apr 8, 2024

The solution for this issue has been 🚀 deployed to production 🚀 in version 1.4.60-13 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-04-15. 🎊

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

Copy link

melvin-bot bot commented Apr 8, 2024

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:

  • [@allroundexperts] The PR that introduced the bug has been identified. Link to the PR:
  • [@allroundexperts] 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:
  • [@allroundexperts] 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:
  • [@allroundexperts] Determine if we should create a regression test for this bug.
  • [@allroundexperts] 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.
  • [] 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 and removed Weekly KSv2 labels Apr 14, 2024
Copy link

melvin-bot bot commented Apr 15, 2024

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

Copy link

melvin-bot bot commented Apr 15, 2024

Payment Summary

Upwork Job

BugZero Checklist (@alexpensify)

  • I have verified the correct assignees and roles are listed above and updated the neccesary manual offers
  • I have verified that there are no duplicate or incorrect contracts on Upwork for this job (https://www.upwork.com/ab/applicants/1775695048648724480/hired)
  • I have paid out the Upwork contracts or cancelled the ones that are incorrect
  • I have verified the payment summary above is correct

@alexpensify
Copy link
Contributor

@nkdengineer - I've sent an offer via Upwork. Please accept and I can complete the payment process. Thanks!

@alexpensify
Copy link
Contributor

Closing, I was able to complete the payment to @nkdengineer. @allroundexperts please submit a request in Chat. Thanks!

@JmillsExpensify
Copy link

$500 approved for @allroundexperts

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 External Added to denote the issue can be worked on by a contributor
Projects
None yet
Development

No branches or pull requests

9 participants