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 2023-08-28] IOU - Cannot edit the amount field in a negative IOU request #24623

Closed
3 of 6 tasks
lanitochka17 opened this issue Aug 16, 2023 · 11 comments
Closed
3 of 6 tasks
Assignees
Labels
Awaiting Payment Auto-added when associated PR is deployed to production Engineering Weekly KSv2

Comments

@lanitochka17
Copy link

lanitochka17 commented Aug 16, 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!


Action Performed:

  1. Open the desktop app build
  2. User B requests X amount from User A
  3. User A requests same amount from User B
  4. User A Clicks on the negative IOU created
  5. Observe the ( - ) sign position in the populated field >> (result 1)
  6. Try to edit the amount field >> (result 2)

Expected Result:

At step 5 (result 1): the negative sign ( - ) should be placed before the currency, not before the numerical number
At step 6 (result. 2): user should be able to edit the amount field

Actual Result:

At step 5 (result 1): the negative sign ( - ) is placed before the numerical number
At step 6 (result. 2): user is unable to edit the amount, either by typing it manually or pasting a number from external source

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.54.5

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

Bug6166667_Screen_Recording_2023-08-15_at_4.58.59_PM.mp4

Expensify/Expensify Issue URL:

Issue reported by: Applause - Internal Team

Slack conversation:

View all open jobs on GitHub

@lanitochka17 lanitochka17 added the DeployBlockerCash This issue or pull request should block deployment label Aug 16, 2023
@OSBotify
Copy link
Contributor

👋 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
Copy link

melvin-bot bot commented Aug 16, 2023

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

@ShogunFire
Copy link
Contributor

ShogunFire commented Aug 16, 2023

Proposal

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

We can´'t modify a negative iou request amount

What is the root cause of that problem?

We shouldn't be able to request a negative amount. The amount we request is always positive, it's just the display that shows a negative sign when two request are canceling each other

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

We can transform the amount to a positive amount using Math.abs before we format the amount and pass it to TextInputWithCurrencySymbol

What alternative solutions did you explore? (Optional)

@melvin-bot melvin-bot bot added Daily KSv2 and removed Hourly KSv2 labels Aug 16, 2023
@srikarparsi
Copy link
Contributor

This is an issue but I'm going to remove the deploy blocker label since it is known that there are issues with editing IOU requests since it is a new feature. #23703 (review)

Assigning you to the issue @mountiny since you made the PR for editing requests. But the issue is that negative IOU requests are not editable.

Screen.Recording.2023-08-16.at.5.27.26.PM.mov

@srikarparsi srikarparsi removed the DeployBlockerCash This issue or pull request should block deployment label Aug 16, 2023
@srikarparsi srikarparsi assigned mountiny and unassigned srikarparsi Aug 16, 2023
@mountiny
Copy link
Contributor

The negative values should not really be showing here which is the root cause. The transactions have the negative amount so we are able to compute the total of who owes to who and so when User A owes $10 and user B requests $1 it will be -1 on that report. The sign would then change again if the user B would request $12 and become a payee.

I think we would not be allowing negative amounts for the IOU requests hence I think what we could do is to always take positive value of the amount in case of IOUs when displaying it

@JmillsExpensify
Copy link

Agree with that.

@melvin-bot melvin-bot bot added Reviewing Has a PR in review Weekly KSv2 and removed Daily KSv2 labels Aug 17, 2023
@mountiny mountiny added Daily KSv2 and removed Weekly KSv2 labels Aug 17, 2023
@mountiny
Copy link
Contributor

Got a PR ready for a review, I think this should actually be a deploy blcoker

@mountiny mountiny added the DeployBlockerCash This issue or pull request should block deployment label Aug 17, 2023
@github-actions github-actions bot added Hourly KSv2 and removed Daily KSv2 labels Aug 17, 2023
@OSBotify
Copy link
Contributor

👋 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.

@mountiny mountiny removed the DeployBlockerCash This issue or pull request should block deployment label Aug 17, 2023
@mountiny
Copy link
Contributor

this is fixed

@melvin-bot melvin-bot bot added Weekly KSv2 Awaiting Payment Auto-added when associated PR is deployed to production and removed Hourly KSv2 labels Aug 21, 2023
@melvin-bot melvin-bot bot changed the title IOU - Cannot edit the amount field in a negative IOU request [HOLD for payment 2023-08-28] IOU - Cannot edit the amount field in a negative IOU request Aug 21, 2023
@melvin-bot melvin-bot bot removed the Reviewing Has a PR in review label Aug 21, 2023
@melvin-bot
Copy link

melvin-bot bot commented Aug 21, 2023

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

@melvin-bot
Copy link

melvin-bot bot commented Aug 21, 2023

The solution for this issue has been 🚀 deployed to production 🚀 in version 1.3.55-8 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 2023-08-28. 🎊

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.

  • External issue reporter
  • Contributor that fixed the issue
  • Contributor+ that helped on the issue and/or PR

As a reminder, here are the bonuses/penalties that should be applied for any External issue:

  • Merged PR within 3 business days of assignment - 50% bonus
  • Merged PR more than 9 business days after assignment - 50% penalty

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 Engineering Weekly KSv2
Projects
None yet
Development

No branches or pull requests

6 participants