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

[WAITING ON SOBIT TO COMPLETE CHECKLIST] [$500] Changing Currency in IOU Causes Account Email to Replace Request Email #26392

Closed
1 of 6 tasks
kavimuru opened this issue Aug 31, 2023 · 56 comments
Assignees
Labels
Bug Something is broken. Auto assigns a BugZero manager. Engineering External Added to denote the issue can be worked on by a contributor Weekly KSv2

Comments

@kavimuru
Copy link

kavimuru commented Aug 31, 2023

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


Action Performed:

  1. Click on the plus sign and select "Request Money".
  2. Enter the desired amount and email address for the money request.
  3. Double-click on the requested money in IOU and change the currency by clicking on the amount.
  4. Go back twice and observe that the requested email has been replaced by the account email.

Expected Result:

Changing the currency in IOU should not cause the account email to replace the requested email.

Actual Result:

Changing the currency in IOU causes the account email to replace the requested email.

Workaround:

Can the user still use Expensify without this being fixed? Have you informed them of the workaround?

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.60-0
Reproducible in staging?: y
Reproducible in production?: y
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

Recording.1404.mp4
screen-capture.-.2023-08-20T224541.860.1.mp4

Expensify/Expensify Issue URL:
Issue reported by: @tewodrosGirmaA
Slack conversation: https://expensify.slack.com/archives/C049HHMV9SM/p1692596411940539

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~0164ab47794feaee80
  • Upwork Job ID: 1699385618357227520
  • Last Price Increase: 2023-09-20
  • Automatic offers:
    • TewodrosGirmaA | Reporter | 26851433
@kavimuru kavimuru added Daily KSv2 Bug Something is broken. Auto assigns a BugZero manager. labels Aug 31, 2023
@melvin-bot
Copy link

melvin-bot bot commented Aug 31, 2023

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

@melvin-bot
Copy link

melvin-bot bot commented Aug 31, 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

@melvin-bot melvin-bot bot added the Overdue label Sep 4, 2023
@melvin-bot
Copy link

melvin-bot bot commented Sep 4, 2023

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

@flaviadefaria flaviadefaria added the External Added to denote the issue can be worked on by a contributor label Sep 6, 2023
@melvin-bot melvin-bot bot changed the title Changing Currency in IOU Causes Account Email to Replace Request Email [$500] Changing Currency in IOU Causes Account Email to Replace Request Email Sep 6, 2023
@melvin-bot
Copy link

melvin-bot bot commented Sep 6, 2023

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

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

melvin-bot bot commented Sep 6, 2023

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

@flaviadefaria
Copy link
Contributor

Added the external label

@melvin-bot
Copy link

melvin-bot bot commented Sep 6, 2023

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

@melvin-bot melvin-bot bot added the Overdue label Sep 11, 2023
@flaviadefaria
Copy link
Contributor

Seems like we're still waiting for proposals.

@melvin-bot melvin-bot bot removed the Overdue label Sep 11, 2023
@Tony-MK
Copy link
Contributor

Tony-MK commented Sep 11, 2023

Proposal

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

Changing Currency in IOU Causes Account Email to Replace Request Email

What is the root cause of that problem?

The ReportActionItemSingle component displays the primary and secondary user details in the ReportActionItemFragment component. The primary user's account ID is fetched from the report.action.actorAccountID and it is the displayName varibale below.

function ReportActionItemSingle(props) {
const actorAccountID = props.action.actorAccountID;
let {displayName} = props.personalDetailsList[actorAccountID] || {};

The root cause of the problem is that when a user changes the currency, the actorAccountID is modified to the user who is changing it. This modification happens in the ReportUtils.js file.

actorAccountID: currentUserAccountID,

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

In this circumstance, instead of using the actorAccountID from props.action.actorAccountID, we should using it from in props.iouReport.managerID only if the props.action.actionName is a CONST.REPORT.ACTIONS.TYPE.REPORTPREVIEW and the props.iouReport is present. Similar to computing the displayAllActors boolean value.

const displayAllActors = useMemo(() => props.action.actionName === CONST.REPORT.ACTIONS.TYPE.REPORTPREVIEW && props.iouReport, [props.action.actionName, props.iouReport]);

When displayAllActors is true, the ReportActionItemSingle component displays the primary and secondary user details. Therefore, we can create a condition to check if it is more appropriate to use the props.iouReport.managerID value for actorAccountID rather than props.action.actorAccountID as it might be the id of the user who changed the currency.

// If this is a report preview, display names and avatars of both people involved
let secondaryAvatar = {};
const primaryDisplayName = displayName;
if (displayAllActors) {
const secondaryUserDetails = props.personalDetailsList[props.iouReport.ownerAccountID] || {};
const secondaryDisplayName = lodashGet(secondaryUserDetails, 'displayName', '');
displayName = `${primaryDisplayName} & ${secondaryDisplayName}`;

In conclusion, I suggest we change this line below from this :

const actorAccountID = props.action.actorAccountID;

To something similar to this:

const actorAccountID = props.action.actionName === CONST.REPORT.ACTIONS.TYPE.REPORTPREVIEW && props.iouReport ? props.iouReport.managerID : props.action.actorAccountID;

@melvin-bot
Copy link

melvin-bot bot commented Sep 13, 2023

📣 It's been a week! Do we have any satisfactory proposals yet? Do we need to adjust the bounty for this issue? 💸

@melvin-bot melvin-bot bot added the Overdue label Sep 13, 2023
@melvin-bot
Copy link

melvin-bot bot commented Sep 14, 2023

@sobitneupane @flaviadefaria this issue was created 2 weeks ago. Are we close to approving a proposal? If not, what's blocking us from getting this issue assigned? Don't hesitate to create a thread in #expensify-open-source to align faster in real time. Thanks!

@sobitneupane
Copy link
Contributor

Thanks for the proposal @Tony-MK

I don't think we can do the change that you are suggesting. ReportActionItemSingle is used in every chat whether it has iouReport or not. And we cannot be sure that iouReport is always present.

@melvin-bot melvin-bot bot removed the Overdue label Sep 14, 2023
@Tony-MK
Copy link
Contributor

Tony-MK commented Sep 15, 2023

Thanks for reviewing my proposal @sobitneupane .

Kindly have a look at my updated proposal, as I considered your concerns in comment #26392 (comment)

@flaviadefaria flaviadefaria added Bug Something is broken. Auto assigns a BugZero manager. and removed Bug Something is broken. Auto assigns a BugZero manager. labels Sep 15, 2023
@melvin-bot
Copy link

melvin-bot bot commented Sep 15, 2023

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

@melvin-bot
Copy link

melvin-bot bot commented Oct 6, 2023

The solution for this issue has been 🚀 deployed to production 🚀 in version 1.3.78-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 2023-10-13. 🎊

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

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:

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

@melvin-bot
Copy link

melvin-bot bot commented Oct 6, 2023

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:

  • [@sobitneupane] The PR that introduced the bug has been identified. Link to the PR:
  • [@sobitneupane] 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:
  • [@sobitneupane] 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:
  • [@sobitneupane] Determine if we should create a regression test for this bug.
  • [@sobitneupane] 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.
  • [@jliexpensify / @flaviadefaria] Link the GH issue for creating/updating the regression test once above steps have been agreed upon:

@melvin-bot melvin-bot bot added Daily KSv2 and removed Weekly KSv2 labels Oct 12, 2023
@jliexpensify
Copy link
Contributor

Whoops apologies - I was out sick at the end of last week. Bump @sobitneupane to complete the checklist so I can sort out payment.

@jliexpensify
Copy link
Contributor

Payment Summary:

Upwork job

@jliexpensify
Copy link
Contributor

Bumping @sobitneupane to complete the checklist please!

@Tony-MK
Copy link
Contributor

Tony-MK commented Oct 17, 2023

@jliexpensify, Sobit stated last week that he will be OOO until next week in this comment

@jliexpensify
Copy link
Contributor

jliexpensify commented Oct 17, 2023

Oh ok, apologies - was not aware. I'll pay out now and Sobit can sort out the list when he's back!

@jliexpensify
Copy link
Contributor

@Tony-MK I think you need to accept the offer before I can pay you?

@Tony-MK
Copy link
Contributor

Tony-MK commented Oct 17, 2023

@jliexpensify Apologies about that. Offer accepted.

@jliexpensify
Copy link
Contributor

Paid and job closed. @sobitneupane when you're back, please request ND payment and complete the checklist.

@jliexpensify jliexpensify changed the title [HOLD for payment 2023-10-13] [$500] Changing Currency in IOU Causes Account Email to Replace Request Email [WAITING ON SOBIT TO COMPLETE CHECKLIST] [$500] Changing Currency in IOU Causes Account Email to Replace Request Email Oct 17, 2023
@jliexpensify jliexpensify added Weekly KSv2 and removed Daily KSv2 Awaiting Payment Auto-added when associated PR is deployed to production labels Oct 17, 2023
@melvin-bot melvin-bot bot added the Overdue label Oct 25, 2023
@deetergp
Copy link
Contributor

deetergp commented Oct 25, 2023

Still waiting on the checklist?

@melvin-bot melvin-bot bot removed the Overdue label Oct 25, 2023
@jliexpensify
Copy link
Contributor

Yep to complete the checklist. I was told @sobitneupane would be back this week!

@jliexpensify
Copy link
Contributor

Pinged Sobit in Slack

@sobitneupane
Copy link
Contributor

Sorry for the delay. I was on leave. I will try to get to it in the weekend.

@jliexpensify
Copy link
Contributor

Thanks @sobitneupane and welcome back!

@sobitneupane
Copy link
Contributor

sobitneupane commented Oct 30, 2023

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:

  • [@sobitneupane] The PR that introduced the bug has been identified. Link to the PR:

#23703

  • [@sobitneupane] 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:

https://github.com/Expensify/App/pull/23703/files#r1375876861

  • [@sobitneupane] 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:

Not Required.

  • [@sobitneupane] Determine if we should create a regression test for this bug.

Yes.

  • [@sobitneupane] 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.

#26392 (comment)

@sobitneupane
Copy link
Contributor

Regression Test Proposal

  1. Click on a report.
  2. Verify the request header is displaying the correct email addresses.
  3. Go to request details.
  4. Change the request change currency.
  5. Go back to the report.
  6. Verify the request header has not changed.

Do we agree 👍 or 👎

@sobitneupane
Copy link
Contributor

#26392 (comment)

Requested payment on newDot.

@jliexpensify
Copy link
Contributor

Closing, thanks Sobit!

@JmillsExpensify
Copy link

$750 payment approved for @sobitneupane based on this 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. Engineering External Added to denote the issue can be worked on by a contributor Weekly KSv2
Projects
None yet
Development

No branches or pull requests

7 participants