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-09-04] [$1000] Split Bill - All user names are showing in IOU #25640

Closed lanitochka17 closed 1 year ago

lanitochka17 commented 1 year 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!


Action Performed:

  1. Access staging.new.epensify.com
  2. Sign into a valid account
  3. Split bill

Expected Result:

User expects that the preview shows the users images and not names

Actual Result:

All split bill user names and date is displayed in the IOU

Workaround:

Unknown

Platforms:

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

Version Number: 1.3.56-2

Reproducible in staging?: Yes

Reproducible in production?: No

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

Bug6172869_On_Staging Bug6172869_On_PROD

Expensify/Expensify Issue URL:

Issue reported by: Applause - Internal Team

Slack conversation:

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~017a8059f6b6485a78
  • Upwork Job ID: 1693876610499690496
  • Last Price Increase: 2023-08-22
  • Automatic offers:
    • jjcoffee | Reviewer | 26263054
    • s-alves10 | Contributor | 26263056
OSBotify commented 1 year ago

:wave: 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.
melvin-bot[bot] commented 1 year ago

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

pradeepmdk commented 1 year ago

Proposal

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

Split Bill - All user names are showing in IOU

What is the root cause of that problem?

Screenshot 2023-08-22 at 7 09 38 AM https://github.com/Expensify/App/blob/c053381c06587d2569247c6d546cf9bd69ceba97/src/libs/ReportUtils.js#L1249 based on its showing the merchant name this pr enabled the merchant https://github.com/Expensify/App/pull/25449/files

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

https://github.com/Expensify/App/blob/c053381c06587d2569247c6d546cf9bd69ceba97/src/libs/actions/IOU.js?#L627

here we are generating the merchant and pass

https://github.com/Expensify/App/blob/c053381c06587d2569247c6d546cf9bd69ceba97/src/libs/TransactionUtils.js?#L69

and here we are using that

https://github.com/Expensify/App/blob/120bcbfde6d0ccfac8a63cf11a4aa7f769a048ea/src/components/ReportActionItem/MoneyRequestPreview.js#L257-L261

!_.isEmpty(requestMerchant) && requestMerchant === CONST.REPORT.TYPE.IOU 

we need to add a condition here it will show only CONST.REPORT.TYPE.IOU,

s-alves10 commented 1 year ago

Proposal

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

All user names appears in split bill

What is the root cause of that problem?

This is a regression from this PR

We create merchant info optimistically when we create split bill here https://github.com/Expensify/App/blob/120bcbfde6d0ccfac8a63cf11a4aa7f769a048ea/src/libs/actions/IOU.js#L627

We show merchant info below https://github.com/Expensify/App/blob/120bcbfde6d0ccfac8a63cf11a4aa7f769a048ea/src/components/ReportActionItem/MoneyRequestPreview.js#L257-L261

This is the root cause

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

I don't think we need to show merchant information in money request preview

Replacing the merchant part in the MoneyRequestPreview will solve the issue

with

 {!props.isBillSplit && requestMerchant && ( 
     <View style={[styles.flexRow]}> 
         <Text style={[styles.textLabelSupporting, styles.mb1, styles.lh16]}>{requestMerchant}</Text> 
     </View> 
 )}

This works as expected

What alternative solutions did you explore? (Optional)

melvin-bot[bot] commented 1 year ago

Job added to Upwork: https://www.upwork.com/jobs/~017a8059f6b6485a78

melvin-bot[bot] commented 1 year ago

Triggered auto assignment to @michaelhaxhiu (External), see https://stackoverflow.com/c/expensify/questions/8582 for more details.

melvin-bot[bot] commented 1 year ago

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

robertjchen commented 1 year ago

Looks like we have a few proposals here already, let's see if we can get a fix reviewed and out as soon as possible

pradeepmdk commented 1 year ago

@robertjchen Proposal updated https://github.com/Expensify/App/issues/25640#issuecomment-1687287112

jjcoffee commented 1 year ago

@pradeepmdk I'm not sure I understand why we would want to display requestMerchant if it's equal to CONST.REPORT.TYPE.IOU; I think that would just display iou.

@s-alves10 Could you explain what part of the PR you linked caused the regression?

s-alves10 commented 1 year ago

Please check

https://github.com/Expensify/App/pull/24235/files#diff-d8e6b69ad4461bebf91e940a67ddc07adf36a3f7c156d6066363c3bde06a0f8aR257-R261

jjcoffee commented 1 year ago

@s-alves10 Perfect, thanks! I don't think removing the merchant info altogether is the correct solution here as it's definitely intended for it to display for requests.

pradeepmdk commented 1 year ago

@jjcoffee Yes I agree it will display always IOU so that is not a correct solution,

solution

the merchant show is a newly added feature. I think we should remove this one https://github.com/Expensify/App/blob/c053381c06587d2569247c6d546cf9bd69ceba97/src/libs/actions/IOU.js?#L627 because this is not a 'merchant' here

but IOU is default value either we can remove it or we can show the default IOU value.

merchant will come from here and use only requestMoney page Screenshot 2023-08-22 at 2 22 58 PM https://github.com/Expensify/App/blob/c053381c06587d2569247c6d546cf9bd69ceba97/src/pages/iou/MoneyRequestMerchantPage.js?#L86

https://github.com/Expensify/App/blob/c053381c06587d2569247c6d546cf9bd69ceba97/src/libs/actions/IOU.js#L333 https://github.com/Expensify/App/blob/c053381c06587d2569247c6d546cf9bd69ceba97/src/libs/actions/IOU.js#L393

jjcoffee commented 1 year ago

@pradeepmdk We do want to display the merchant for money requests, just not for splitting bills (the merchant feature is disabled for splits for now).

Still open for proposals that deal with this issue specifically for split bills!

jjcoffee commented 1 year ago

Bumped on Slack for more proposals.

s-alves10 commented 1 year ago

Proposal

Updated

pradeepmdk commented 1 year ago

@pradeepmdk We do want to display the merchant for money requests, just not for splitting bills (the merchant feature is disabled for splits for now).

Still open for proposals that deal with this issue specifically for split bills!

then we can use this!props.isBillSplit && requestMerchant i think @s-alves10 already updated this

jjcoffee commented 1 year ago

@s-alves10's proposal has the correct RCA, since that PR introduced the actual display of the merchant in the MoneyRequestPreview. The solution could do with a bit more detail, but I'm giving a little leeway as this is a deploy blocker!

@robertjchen I'm lacking a bit of context on the rollout of the merchant field (since the linked issues are internal), so I'm unsure if hiding the merchant on split bills would just be a temporary fix (whilst merchant is disabled for split bills). In any case as this is a deploy blocker, it seems like @s-alves10 fix is appropriate to apply until the merchant field is up and running for split bills.

:ribbon::eyes::ribbon: C+ reviewed

melvin-bot[bot] commented 1 year ago

Current assignee @robertjchen is eligible for the choreEngineerContributorManagement assigner, not assigning anyone new.

robertjchen commented 1 year ago

Thanks for all the discussion here! πŸ™‡

@jjcoffee is correct, as this would be a temporary fix and we may not have enough context at the moment πŸ€” In reviewing this, I just saw that they were considering reverting the PR that introduced this along with the other issues. https://github.com/Expensify/App/pull/24235#issuecomment-1687652892

To avoid any potential conflicts, I'll defer to them here and see if they want to fix this (and accept this change) or revert. cc: @Li357

Li357 commented 1 year ago

Hi y'all!

I'd prefer not to revert the linked PR due to its internal importance. I think a lot of these are small changes that can be fixed piecemeal. Thanks for catching this!

robertjchen commented 1 year ago

@Li357 ok perfect, no worries! we can proceed with the fix here πŸ‘

melvin-bot[bot] commented 1 year ago

πŸ“£ @jjcoffee πŸŽ‰ 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[bot] commented 1 year ago

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

jjcoffee commented 1 year ago

@s-alves10 If you have any issues with slow Android build times, please just raise the PR so I can make a head-start on testing. Thanks!

s-alves10 commented 1 year ago

Okay

s-alves10 commented 1 year ago

@jjcoffee

PR is created as draft. I'm testing on various platforms now. Will have it ready for review in an hour or 2.

s-alves10 commented 1 year ago

@jjcoffee

PR is ready for review

melvin-bot[bot] commented 1 year ago

🎯 ⚑️ Woah @jjcoffee / @s-alves10, 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 πŸš€

jjcoffee commented 1 year ago

Not sure why the automation didn't kick in here, but the PR was deployed to production 2023-08-24. @michaelhaxhiu can you update the title to hold for payment for 2023-08-31? Thanks!

melvin-bot[bot] commented 1 year ago

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

melvin-bot[bot] commented 1 year ago

The solution for this issue has been :rocket: deployed to production :rocket: in version 1.3.57-6 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-09-04. :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:

jjcoffee commented 1 year ago

@michaelhaxhiu Gentle bump for payment on this. Thanks!

michaelhaxhiu commented 1 year ago

I apologize for the delay!

michaelhaxhiu commented 1 year ago

both paid, closing!