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-11-26] [$250] Distance - After tapping split expense with amount button, briefly "split expense" button shown #52196

Open
1 of 8 tasks
IuliiaHerets opened this issue Nov 7, 2024 · 13 comments
Assignees
Labels
Awaiting Payment Auto-added when associated PR is deployed to production Bug Something is broken. Auto assigns a BugZero manager. External Added to denote the issue can be worked on by a contributor Weekly KSv2

Comments

@IuliiaHerets
Copy link

IuliiaHerets commented Nov 7, 2024

If you haven’t already, check out our contributing guidelines for onboarding and email [email protected] to request to join our Slack channel!


Version Number: v9.0.59-0
Reproducible in staging?: Y
Reproducible in production?: Y
Issue reported by: Applause Internal Team

Action Performed:

  1. Go to https://staging.new.expensify.com/home
  2. Open a room chat with few members invited
  3. Tap plus icon left to chat input
  4. Tap split expense - distance
  5. Enter start and stop points
  6. Tap next
  7. Note tap split expense with amount button displayed
  8. Tap on it

Expected Result:

After tapping split expense with amount button, briefly "split expense" button must not be shown before showing conversation page.

Actual Result:

After tapping split expense with amount button, briefly "split expense" button is shown before showing conversation page.

Workaround:

Unknown

Platforms:

  • Android: Standalone
  • Android: HybridApp
  • Android: mWeb Chrome
  • iOS: Standalone
  • iOS: HybridApp
  • iOS: mWeb Safari
  • MacOS: Chrome / Safari
  • MacOS: Desktop

Screenshots/Videos

Bug6657658_1730988489659.Screenrecorder-2024-11-07-19-29-40-188.mp4

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~021855539288770032834
  • Upwork Job ID: 1855539288770032834
  • Last Price Increase: 2024-11-10
  • Automatic offers:
    • FitseTLT | Contributor | 104839763
Issue OwnerCurrent Issue Owner: @jliexpensify
@IuliiaHerets IuliiaHerets added Daily KSv2 Bug Something is broken. Auto assigns a BugZero manager. labels Nov 7, 2024
Copy link

melvin-bot bot commented Nov 7, 2024

Triggered auto assignment to @jliexpensify (Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details. Please add this bug to a GH project, as outlined in the SO.

@FitseTLT
Copy link
Contributor

FitseTLT commented Nov 7, 2024

Edited by proposal-police: This proposal was edited at 2024-11-07 16:12:46 UTC.

Proposal

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

Distance - After tapping split expense with amount button, briefly "split expense" button shown

What is the root cause of that problem?

We reset the draft transaction on creating the expense and we show the split expense button if the iouAmount is 0

} else if (isTypeSplit && iouAmount === 0) {
text = translate('iou.splitExpense');

so as the draft transaction amount is not available (0) it will show 'split expense'

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

We can remove the draft transaction clearing code every where we are clearing it now like here

App/src/libs/actions/IOU.ts

Lines 4134 to 4136 in 8a83e2b

key: `${ONYXKEYS.COLLECTION.TRANSACTION}${splitTransaction.transactionID}`,
value: splitTransaction,
},

here here here
Because we are already clearing the draft transaction in startMoneyRequest

App/src/libs/actions/IOU.ts

Lines 392 to 393 in 8a83e2b

function startMoneyRequest(iouType: ValueOf<typeof CONST.IOU.TYPE>, reportID: string, requestType?: IOURequestType, skipConfirmation = false) {
clearMoneyRequest(CONST.IOU.OPTIMISTIC_TRANSACTION_ID, skipConfirmation);

We can apply the change for our split case related to the current issue but I think it is better to apply it globally.

What alternative solutions did you explore? (Optional)

Alternatively we can use TransactionEdit.removeDraftTransaction with runAfterInteraction here

formHasBeenSubmitted.current = true;

            InteractionManager.runAfterInteractions(() => removeDraftTransaction(CONST.IOU.OPTIMISTIC_TRANSACTION_ID));

If we feel unsafe clearing the draft transaction before the create request actions have been called ( as we need the draft transaction value inside the functions) we can call it after the createTransaction function calls

@jliexpensify
Copy link
Contributor

@FitseTLT @IuliiaHerets a few questions:

Version Number: 5.0.49-0

Do you mean 59-0 @IuliiaHerets?

Open a room chat with few members invited

Does this mean more than 1 other person? Is there a minimum number?

@IuliiaHerets
Copy link
Author

@jliexpensify Yes, you are right, build - v9.0.59-0.
The number of members is not important, the main thing is that it is possible to create a split request.

@jliexpensify jliexpensify added the External Added to denote the issue can be worked on by a contributor label Nov 10, 2024
@melvin-bot melvin-bot bot changed the title Distance - After tapping split expense with amount button, briefly "split expense" button shown [$250] Distance - After tapping split expense with amount button, briefly "split expense" button shown Nov 10, 2024
Copy link

melvin-bot bot commented Nov 10, 2024

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

@melvin-bot melvin-bot bot added Overdue Help Wanted Apply this label when an issue is open to proposals by contributors labels Nov 10, 2024
Copy link

melvin-bot bot commented Nov 10, 2024

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

@jliexpensify
Copy link
Contributor

Thanks for cionfirming - adding External as I could repro the other day.

@s77rt
Copy link
Contributor

s77rt commented Nov 10, 2024

@FitseTLT Thanks for the proposal. The RCA and the solution look good to me.

🎀 👀 🎀 C+ reviewed
Link to proposal

Copy link

melvin-bot bot commented Nov 10, 2024

Triggered auto assignment to @Julesssss, see https://stackoverflow.com/c/expensify/questions/7972 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 Nov 11, 2024
Copy link

melvin-bot bot commented Nov 11, 2024

📣 @FitseTLT 🎉 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 Nov 19, 2024
@melvin-bot melvin-bot bot changed the title [$250] Distance - After tapping split expense with amount button, briefly "split expense" button shown [HOLD for payment 2024-11-26] [$250] Distance - After tapping split expense with amount button, briefly "split expense" button shown Nov 19, 2024
@melvin-bot melvin-bot bot removed the Reviewing Has a PR in review label Nov 19, 2024
Copy link

melvin-bot bot commented Nov 19, 2024

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

Copy link

melvin-bot bot commented Nov 19, 2024

The solution for this issue has been 🚀 deployed to production 🚀 in version 9.0.63-3 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-11-26. 🎊

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

Copy link

melvin-bot bot commented Nov 19, 2024

@s77rt @jliexpensify @s77rt The PR fixing this issue has been merged! The following checklist (instructions) will need to be completed before the issue can be closed. Please copy/paste the BugZero Checklist from here into a new comment on this GH and complete it. If you have the K2 extension, you can simply click: [this button]

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. External Added to denote the issue can be worked on by a contributor Weekly KSv2
Projects
Status: Bugs and Follow Up Issues
Development

No branches or pull requests

5 participants