Expensify / App

Welcome to New Expensify: a complete re-imagination of financial collaboration, centered around chat. Help us build the next generation of Expensify by sharing feedback and contributing to the code.
https://new.expensify.com
MIT License
3.36k stars 2.78k forks source link

[HOLD for payment 2023-10-30] [$500] IOU-In Workspace, split bill detail page, category option is not shown #29178

Closed lanitochka17 closed 10 months ago

lanitochka17 commented 11 months ago

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.3.80-0

Reproducible in staging?: Yes

Reproducible in production?: Yes

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:

Issue found when executing PR https://github.com/Expensify/App/pull/28628

Action Performed:

  1. Launch app - expensifail sccount
  2. Tap fab
  3. Tap request money- manual
  4. Enter an amount
  5. Tap next
  6. Select any Workspace and tap " split"
  7. Tap add to split
  8. Tap show more and select a category
  9. Tap split amount
  10. Tap split amount transaction to open split detail page
  11. Tap " show more"

Expected Result:

In Workspace, split bill detail page, category option must be shown

Actual Result:

In Workspace, split bill detail page, category option is not shown

Workaround:

Unknown

Platforms:

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

Screenshots/Videos

Android: Native https://github.com/Expensify/App/assets/78819774/01907030-702e-4d1c-b3d7-5b263aa72eca
Android: mWeb Chrome https://github.com/Expensify/App/assets/78819774/a508703e-a297-48eb-aab1-c7a291e1495c
Windows: Chrome https://github.com/Expensify/App/assets/78819774/f67782b4-dc7d-40e7-89ef-a289c885f05a
iOS: mWeb Safari
MacOS: Chrome / Safari
MacOS: Desktop https://github.com/Expensify/App/assets/78819774/b4db19f6-ae08-4da7-94d7-45ea9b071015

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~01de758e8c4c31ca17
  • Upwork Job ID: 1711881725957390336
  • Last Price Increase: 2023-10-10
  • Automatic offers:
    • Nodebrute | Contributor | 27258819
melvin-bot[bot] commented 11 months ago

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

melvin-bot[bot] commented 11 months ago

Bug0 Triage Checklist (Main S/O)

Nodebrute commented 11 months ago

Proposal

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

On the split bill detail page, the category option is not displayed.

What is the root cause of that problem?

Here we are displaying "category" using this check https://github.com/Expensify/App/blob/c68bf6a06e2b8b42518c485f70ae0d0372f8ae64/src/components/MoneyRequestConfirmationList.js#L201-L203

We haven't passed the isPolicyExpenseChat prop to MoneyRequestConfirmationList on the SplitBillDetailsPage. Consequently, the props.isPolicyExpenseChat will default to 'false' when we're on the SplitBillDetailsPage, causing the above-mentioned check to evaluate to 'false' as well. As a result, we won't be able to see the Category options here. https://github.com/Expensify/App/blob/c228338a2768f28eb9a2516e2a5de0f02f720d03/src/pages/iou/SplitBillDetailsPage.js#L84

This is not the case when we display the MoneyRequestConfirmationList on the MoneyRequestConfirmationList page because we are passing the isPolicyExpenseChat prop there. Consequently, we can see the category option on the MoneyRequestConfirmationList page. https://github.com/Expensify/App/blob/c68bf6a06e2b8b42518c485f70ae0d0372f8ae64/src/pages/iou/steps/MoneyRequestConfirmPage.js#L324

We are also utilizing the props.isPolicyExpenseChat for tag checking purposes. The suggested solution will address this issue as well. https://github.com/Expensify/App/blob/c68bf6a06e2b8b42518c485f70ae0d0372f8ae64/src/components/MoneyRequestConfirmationList.js#L210

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

We should pass isPolicyExpenseChat prop here https://github.com/Expensify/App/blob/c228338a2768f28eb9a2516e2a5de0f02f720d03/src/pages/iou/SplitBillDetailsPage.js#L84

What alternative solutions did you explore? (Optional)

melvin-bot[bot] commented 11 months ago

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

melvin-bot[bot] commented 11 months ago

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

bfitzexpensify commented 11 months ago

Proposal in https://github.com/Expensify/App/issues/29178#issuecomment-1755750275 ready for review @mollfpr

mollfpr commented 11 months ago

The proposal from @Nodebrute looks good!

πŸŽ€ πŸ‘€ πŸŽ€ C+ reviewed!

@bfitzexpensify Could you help with adding the Engineering label? Thank you!

melvin-bot[bot] commented 11 months ago

Triggered auto assignment to @arosiclair (Engineering), see https://stackoverflow.com/c/expensify/questions/4319 for more details.

arosiclair commented 11 months ago

@bfitzexpensify Could you help with adding the Engineering label? Thank you!

Is the auto-assigner not working after approving a proposal anymore?

melvin-bot[bot] commented 11 months ago

πŸ“£ @Nodebrute πŸŽ‰ 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 πŸ“–

mollfpr commented 11 months ago

@arosiclair I think it's because I'm not on the team so Melvin won't be triggered.

Nodebrute commented 11 months ago

Hey @mollfpr, the PR is ready for review

melvin-bot[bot] commented 11 months ago

🎯 ⚑️ Woah @Nodebrute, great job pushing this forwards! ⚑️

The pull request got merged within 3 working days of assignment, so this job is eligible for a 50% #urgency bonus πŸŽ‰

On to the next one πŸš€

melvin-bot[bot] commented 11 months ago

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

melvin-bot[bot] commented 11 months ago

The solution for this issue has been :rocket: deployed to production :rocket: in version 1.3.88-11 and is now subject to a 7-day regression period :calendar:. Here is the list of pull requests that resolve this issue:

If no regressions arise, payment will be issued on 2023-10-30. :confetti_ball:

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.

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:

melvin-bot[bot] commented 11 months ago

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:

bfitzexpensify commented 11 months ago

Offer sent for C+ work @mollfpr - also, a reminder to complete the BZ checklist when you get a moment, thank you!

mollfpr commented 11 months ago

The PR that introduced the bug has been identified. Link to the PR: 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:

I don't think any PR is causing this issue. I believe we forgot to update the list when decided to add the category to the split bill.

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.

Determine if we should create a regression test for this bug. 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.

Note: the backend is not ready yet to add and get a category for a split bill. So, we need to mock a situation when we have a category inside a split bill.

Hack: we need to modify getCategory of TransactionUtils.ts. The function should return a hardcode string - name of a category like: return "Home".

For reference https://github.com/Expensify/App/pull/28628#issue-1922195467

  1. Launch app ->Tap fab
  2. Tap request money -> manual
  3. Enter an amount -> Tap next
  4. Select any Workspace and tap " split"
  5. Tap add to split
  6. Tap show more and select a category
  7. Tap split amount
  8. Tap the split amount transaction to open the split detail page
  9. Tap "Show more"
  10. Verify that you can see the category option
mollfpr commented 11 months ago

@bfitzexpensify I'll do manual request, could you give the payment summary? Thanks!

JmillsExpensify commented 11 months ago

Awaiting payment summary

bfitzexpensify commented 11 months ago

Payment summary:

Contributor: @Nodebrute due $750 to be paid via Upwork βœ… C+: @mollfpr due $750 to be paid via manual request

mollfpr commented 11 months ago

@bfitzexpensify I think you tag the wrong C+ πŸ˜…

Friendly bump @JmillsExpensify for the approval.

JmillsExpensify commented 11 months ago

$750 payment approved for @mollfpr based on summary above.

melvin-bot[bot] commented 10 months ago

@arosiclair, @mollfpr, @bfitzexpensify, @Nodebrute Uh oh! This issue is overdue by 2 days. Don't forget to update your issues!

bfitzexpensify commented 10 months ago

Regression test proposed in https://github.com/Expensify/Expensify/issues/334065

We're all done here, thanks everyone.