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

[$1000] Split Bill - Last Split Bill description within the group is displayed on all split bill detail pages #19855

Closed
6 tasks done
kbecciv opened this issue May 30, 2023 · 13 comments
Assignees
Labels
Bug Something is broken. Auto assigns a BugZero manager. Daily KSv2 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

Comments

@kbecciv
Copy link

kbecciv commented May 30, 2023

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


Issue found when executing PR#19390

Action Performed:

  1. Go to NewDot
  2. Create a split bill with several users with description
  3. Open group chat and create another split bill with different description
  4. Open new split Details page for the first Split Bill

Expected Result:

Description from step 2 should be displayed

Actual Result:

Description from step 3 is displayed

Workaround:

Unknown

Platforms:

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

  • Android / native
  • Android / Chrome
  • iOS / native
  • iOS / Safari
  • MacOS / Chrome / Safari
  • MacOS / Desktop

Version Number: 1.3.20.1

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

https://platform.applause.com/services/links/v1/external/308be96fbcf3f79db684db2be6e296224360728aeae1cc63681b405b0cea2035

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/~01edb91d2bc99f8597
  • Upwork Job ID: 1663688334189305856
  • Last Price Increase: 2023-05-30
@kbecciv kbecciv added Daily KSv2 Bug Something is broken. Auto assigns a BugZero manager. labels May 30, 2023
@melvin-bot
Copy link

melvin-bot bot commented May 30, 2023

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

@melvin-bot
Copy link

melvin-bot bot commented May 30, 2023

Bug0 Triage Checklist (Main S/O)

  • This "bug" occurs on a supported platform (ensure Platforms in OP are ✅)
  • This bug is not a duplicate report (check E/App issues and #expensify-bugs)
    • If it is, comment with a link to the original report, close the issue and add any novel details to the original issue instead
  • This bug is reproducible using the reproduction steps in the OP. S/O
    • If the reproduction steps are clear and you're unable to reproduce the bug, check with the reporter and QA first, then close the issue.
    • If the reproduction steps aren't clear and you determine the correct steps, please update the OP.
  • This issue is filled out as thoroughly and clearly as possible
    • Pay special attention to the title, results, platforms where the bug occurs, and if the bug happens on staging/production.
  • I have reviewed and subscribed to the linked Slack conversation to ensure Slack/Github stay in sync

@twisterdotcom
Copy link
Contributor

Very weird. It seems to be just taking the oldest open description:
image

Like in this instance, it's a split with two others, but the description is the description of a split with just the two from earlier:
image

@twisterdotcom twisterdotcom added the External Added to denote the issue can be worked on by a contributor label May 30, 2023
@melvin-bot melvin-bot bot changed the title Split Bill - Last Split Bill description within the group is displayed on all split bill detail pages [$1000] Split Bill - Last Split Bill description within the group is displayed on all split bill detail pages May 30, 2023
@melvin-bot
Copy link

melvin-bot bot commented May 30, 2023

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

@melvin-bot
Copy link

melvin-bot bot commented May 30, 2023

Current assignee @twisterdotcom is eligible for the External assigner, not assigning anyone new.

@melvin-bot
Copy link

melvin-bot bot commented May 30, 2023

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

@melvin-bot melvin-bot bot added the Help Wanted Apply this label when an issue is open to proposals by contributors label May 30, 2023
@melvin-bot
Copy link

melvin-bot bot commented May 30, 2023

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

@BhuvaneshPatil
Copy link
Contributor

BhuvaneshPatil commented May 31, 2023

Proposal

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

in Split bill detail page, the description shown is not matching with original

What is the root cause of that problem?

For MoneyRequestConfirmationList we are taking IOU from Onyx, that is global IOU.

export default compose(
withLocalize,
withWindowDimensions,
withCurrentUserPersonalDetails,
withOnyx({
iou: {key: ONYXKEYS.IOU},
session: {
key: ONYXKEYS.SESSION,
},
}),
)(MoneyRequestConfirmationList);
example - When I try to create new Split Bill, the IOU will be using its description for the value. It's being set at below -
updateComment(value) {
IOU.setMoneyRequestDescription(value.moneyRequestComment);
Navigation.goBack();
}

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

Like we are passing the iouAmount to MoneyRquestConfirmationList component, we can pass the new prop iouComment from SplitBillDetailsPage.

Working Solution
Split.Bill.Description.Issue.-.Made.with.Clipchamp.mp4

What alternative solutions did you explore? (Optional)

  • Updating IOU in ONYX using setMoneyRequestDescription() can be a alternative, however this change should be made carefully, because that value(IOU) is being used at many places. When we open the modal we can use setMoneyRequestDescription() to set the value of description and upon closing we can reset it to empty string.

@tienifr
Copy link
Contributor

tienifr commented May 31, 2023

Proposal

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

Split bill detail page doesn't show the correct comment

What is the root cause of that problem?

When users update the description, it will be stored in IOU (Onyx).

IOU.setMoneyRequestDescription(value.moneyRequestComment);

We just reset this value when open spillBill modal again

In

title={this.props.iou.comment}

We're getting comment from IOU in Onyx, so that's wrong value

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

  1. In MoneyRequestModal: When users complete the transaction, we should clear this value in onyx by calling IOU.setMoneyRequestDescription(''); in onConfirm and onSendMoney.

onConfirm={(selectedParticipants) => {
createTransaction(selectedParticipants);
ReportScrollManager.scrollToBottom();
}}
onSendMoney={(paymentMethodType) => {
sendMoney(paymentMethodType);
ReportScrollManager.scrollToBottom();
}}

Or we can reset comment when the component is unmounted

Then pass iouComment={props.iou.comment} below this line

bankAccountRoute={bankAccountRoute}

  1. In SpitBillDetailPage: get iou comment from reportAction like what we did with iou amount, and pass it to MoneyRequestConfirmationList
    const iouComment = lodashGet(reportAction, 'originalMessage.comment')
  1. In MoneyRequestConfirmationList: add iouComment as the new props and use it instead of this.props.iou.comment

@Julesssss
Copy link
Contributor

Closing as a dupe of this previously reported issue. Feel free to add proposals to that issue instead.

@twisterdotcom
Copy link
Contributor

Nice! I think that was created after, but I'm happy to have one off the plate. 😄

@Julesssss
Copy link
Contributor

Julesssss commented May 31, 2023

Created after, but it was raised way earlier in Slack. Better to keep the original issue rather than remember to pay out the contributor -- else I would have happily left this to you :)

@esh-g
Copy link
Contributor

esh-g commented Jun 1, 2023

@tienifr Please review this comment: #19870 (comment)
which is regarding a regression that can be caused if we use props.iouComment instead of props.iou.comment

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something is broken. Auto assigns a BugZero manager. Daily KSv2 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
Projects
None yet
Development

No branches or pull requests

8 participants