Skip to content

[HOLD for payment 2024-06-20] [$250] Quick action - Submit button displays different amount compared to amount in BNP #42283

Closed

Description

@izarutskaya

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.74-1
Reproducible in staging?: Y
Reproducible in production?: Y
Logs: https://stackoverflow.com/c/expensify/questions/4856
Issue reported by: Applause-Internal team

Action Performed:

  1. Go to staging.new.expensify.com
  2. Submit an expense to a user.
  3. Go to FAB.
  4. Click Submit expense under Quick action.
  5. Enter amount.
  6. Select a different currency.
  7. Change the amount.

Expected Result:

The Submit button should just display Submit without the amount.

Actual Result:

After changing to amount B, the submit button still shows amount A, which can be confusing.

Workaround:

Unknown

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

Bug6482393_1715838385160.20240516_134245.mp4

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~0180b3b2cbd28bb97e
  • Upwork Job ID: 1798112401827979264
  • Last Price Increase: 2024-06-04
  • Automatic offers:
    • dukenv0307 | Reviewer | 102636019
    • cretadn22 | Contributor | 102636020
Issue OwnerCurrent Issue Owner: @kevinksullivan

Activity

  1. added
    BugSomething is broken. Auto assigns a BugZero manager.
    on May 16, 2024
  2. melvin-bot commented on May 16, 2024

    @melvin-bot

    Triggered auto assignment to @kevinksullivan (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.

  3. izarutskaya commented on May 16, 2024

    @izarutskaya
    Author

    We think this issue might be related to the #vip-vsb.

  4. allgandalf commented on May 16, 2024

    @allgandalf
    Contributor

    For submitting an expense via a workspace, we do not show the amount in Submit button so to be consistent with that approach we won't show the amount in 1:1 requests as well.

    Proposal

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

    Amount is displayed in Submit Button, this is inconsistent with other type of requests, we should not show it.

    What is the root cause of that problem?

    We decide the text of the submit button based on the function buttonText

    const buttonText: string = useMemo(() => {

    This useMemo has a dependency for currency, so whenever the currency updated the latest amount in BNP gets updated but when we update the amount we do not have that action in useMemo dependency:

    }, [skipConfirmation, iouType, currency, isEditing, translate]);

    hence we do not see the amount change, but to be consistent with other type requests and the time we split request for the first time we should not show the amount in submit button.

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

    1. We need to remove the currency dependency if we decide to not show the amount at all when we update the currency.

    2. Else we need to add dependency in the useMemo to call the buttonText whenever we update the amount, but I don't think so we want that!

    What alternative solutions did you explore? (Optional)

  5. kevinksullivan commented on May 20, 2024

    @kevinksullivan
    Contributor
  6. melvin-bot commented on May 24, 2024

    @melvin-bot

    @kevinksullivan Uh oh! This issue is overdue by 2 days. Don't forget to update your issues!

  7. melvin-bot commented on May 28, 2024

    @melvin-bot

    @kevinksullivan 6 days overdue. This is scarier than being forced to listen to Vogon poetry!

  8. melvin-bot commented on May 30, 2024

    @melvin-bot

    @kevinksullivan this issue was created 2 weeks ago. Are we close to a solution? Let's make sure we're treating this as a top priority. Don't hesitate to create a thread in #expensify-open-source to align faster in real time. Thanks!

  9. melvin-bot commented on May 30, 2024

    @melvin-bot

    @kevinksullivan 8 days overdue is a lot. Should this be a Weekly issue? If so, feel free to change it!

  10. melvin-bot commented on Jun 3, 2024

    @melvin-bot

    @kevinksullivan 12 days overdue now... This issue's end is nigh!

  11. 42 remaining items

  12. melvin-bot commented on Jun 13, 2024

    @melvin-bot

    The solution for this issue has been 🚀 deployed to production 🚀 in version 1.4.82-4 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-06-20. 🎊

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

  13. melvin-bot commented on Jun 13, 2024

    @melvin-bot

    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:

    • [@dukenv0307] The PR that introduced the bug has been identified. Link to the PR:
    • [@dukenv0307] 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:
    • [@dukenv0307] 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:
    • [@dukenv0307] Determine if we should create a regression test for this bug.
    • [@dukenv0307] 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.
    • [@kevinksullivan] Link the GH issue for creating/updating the regression test once above steps have been agreed upon:
  14. cretadn22 commented on Jun 24, 2024

    @cretadn22
    Contributor

    @kevinksullivan Hi, the payment is ready.

  15. melvin-bot commented on Jun 24, 2024

    @melvin-bot

    @Beamanator, @kevinksullivan, @dukenv0307, @cretadn22 Huh... This is 4 days overdue. Who can take care of this?

  16. kevinksullivan commented on Jun 25, 2024

    @kevinksullivan
    Contributor

    @dukenv0307 can you complete the checklist above please?

  17. kevinksullivan commented on Jun 25, 2024

    @kevinksullivan
    Contributor

    Payments made to @cretadn22 and @dukenv0307 , just waiting on the checklist's completion.

  18. dukenv0307 commented on Jun 26, 2024

    @dukenv0307
    Contributor

    BugZero Checklist:

    • The PR that introduced the bug has been identified. Link to the PR: N/A
    • 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: N/A
    • 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: N/A
    • Determine if we should create a regression test for this bug. No
    • 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. N/A
  19. dukenv0307 commented on Jun 26, 2024

    @dukenv0307
    Contributor

    @kevinksullivan Thanks for pointing that out. We're good to close this issue

  20. kevinksullivan commented on Jun 26, 2024

    @kevinksullivan
    Contributor

    Thanks @dukenv0307 ! All set here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

Awaiting PaymentAuto-added when associated PR is deployed to productionBugSomething is broken. Auto assigns a BugZero manager.DailyKSv2ExternalAdded to denote the issue can be worked on by a contributor

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions