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-08-01] [$250] Expense - Description row in transaction thread is empty after saving the description #45830

Closed
6 tasks done
m-natarajan opened this issue Jul 20, 2024 · 27 comments
Assignees
Labels
Awaiting Payment Auto-added when associated PR is deployed to production Bug Something is broken. Auto assigns a BugZero manager. Daily KSv2 Engineering 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

@m-natarajan
Copy link

m-natarajan commented Jul 20, 2024

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: 9.0.10-2
Reproducible in staging?: y
Reproducible in production?: no
If this was caught during regression testing, add the test name, ID and link from TestRail: n/a
Email or phone of affected tester (no customers):
Logs: https://stackoverflow.com/c/expensify/questions/4856
Expensify/Expensify Issue URL:
Issue reported by: Applause internal team
Slack conversation:

Action Performed:

  1. Go to staging.new.expensify.com
  2. Go to workspace chat.
  3. Submit an expense.
  4. Go to transaction thread.
  5. Click Description.
  6. Enter description and save it.

Expected Result:

The saved description will appear on Description row in transaction thread.

Actual Result:

The Description row in transaction thread is empty after saving the description.

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

Bug6547703_1721436040689.20240720_083826.mp4

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~019f38e792188ee307
  • Upwork Job ID: 1815419992762713976
  • Last Price Increase: 2024-07-22
Issue OwnerCurrent Issue Owner: @
Issue OwnerCurrent Issue Owner: @mallenexpensify
@m-natarajan m-natarajan added DeployBlockerCash This issue or pull request should block deployment Daily KSv2 Bug Something is broken. Auto assigns a BugZero manager. DeployBlocker Indicates it should block deploying the API labels Jul 20, 2024
Copy link

melvin-bot bot commented Jul 20, 2024

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

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 melvin-bot bot added Daily KSv2 and removed Hourly KSv2 labels Jul 20, 2024
Copy link

melvin-bot bot commented Jul 20, 2024

Triggered auto assignment to @pecanoro (DeployBlockerCash), see https://stackoverflowteams.com/c/expensify/questions/9980/ for more details.

@Krishna2323
Copy link
Contributor

Krishna2323 commented Jul 20, 2024

Proposal

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

Expense - Description row in transaction thread is empty after saving the description

What is the root cause of that problem?

TransactionUtils.getDescription returns empty string when description is not present in the provided transaction and due to ??(Nullish Coalescing Operator) transactionDescription isn't used as the fallback value since ?? will only deals with null or undefined and in our case we have an empty string.

title={TransactionUtils.getDescription(updatedTransaction ?? null) ?? transactionDescription}

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

Update ?? to ||.

title={TransactionUtils.getDescription(updatedTransaction ?? null) || transactionDescription}

What alternative solutions did you explore? (Optional)

@mountiny
Copy link
Contributor

cc @pecanoro @JmillsExpensify @parasharrajat

This is also coming from the dupe detection PR

@mountiny mountiny removed the DeployBlocker Indicates it should block deploying the API label Jul 20, 2024
@mountiny mountiny assigned mountiny and parasharrajat and unassigned pecanoro Jul 20, 2024
@melvin-bot melvin-bot bot added Reviewing Has a PR in review Weekly KSv2 and removed Daily KSv2 labels Jul 20, 2024
@mountiny
Copy link
Contributor

@parasharrajat I have raised a quick PR and assigned you as its coming from the dupe detection PR

@mountiny
Copy link
Contributor

@Krishna2323 I will offer you a partial reward for help spotting it.

Please remember that for any issues that are deploy blockers, always link the offending PR in your proposal. In this case it was super simple to find. Thanks!

@Krishna2323
Copy link
Contributor

Thanks @mountiny, I will keep this in mind next time.

@dominictb
Copy link
Contributor

I see the current implementation in PR is incorrect and leads to the regression: Assume we have 2 duplicates transaction that have descriptions are "description 1" and "description 2". When reviewing duplicates, in step "Choose which description to keep", if I choose "None", then in confirmation page, it still displays "description 1" or "description 2", but the expected is ""

Proposal

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

What is the root cause of that problem?

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

  • We need to create a new variable:
    const updatedTransactionDescription = useMemo(() => {
        if (!updatedTransaction) {
            return undefined;
        }
        return TransactionUtils.getDescription(updatedTransaction ?? null);
    }, [updatedTransaction]);

and use it in:

title={TransactionUtils.getDescription(updatedTransaction ?? null) ?? transactionDescription}

                        title={updatedTransactionDescription ?? transactionDescription}
  • It will make sure: In case normal confirmation page, with updatedTransaction is undefined, we use transactionDescription. In case review duplicate confirmation page, with updatedTransaction is defined, we use updatedTransactionDescription from updatedTransaction

@dominictb
Copy link
Contributor

@parasharrajat @mountiny This issue is internal, but I've noticed potential problems with the current PR. I've added a comment using the proposal template to clarify the root cause analysis and solution.

@dominictb
Copy link
Contributor

PR #45922 is opened to review.

Copy link

melvin-bot bot commented Jul 22, 2024

⚠️ Looks like this issue was linked to a Deploy Blocker here

If you are the assigned CME please investigate whether the linked PR caused a regression and leave a comment with the results.

If a regression has occurred and you are the assigned CM follow the instructions here.

If this regression could have been avoided please consider also proposing a recommendation to the PR checklist so that we can avoid it in the future.

@francoisl francoisl removed the DeployBlockerCash This issue or pull request should block deployment label Jul 23, 2024
@melvin-bot melvin-bot bot added Weekly KSv2 Awaiting Payment Auto-added when associated PR is deployed to production and removed Weekly KSv2 labels Jul 25, 2024
@melvin-bot melvin-bot bot changed the title [$250] Expense - Description row in transaction thread is empty after saving the description [HOLD for payment 2024-08-01] [$250] Expense - Description row in transaction thread is empty after saving the description Jul 25, 2024
@melvin-bot melvin-bot bot removed the Reviewing Has a PR in review label Jul 25, 2024
Copy link

melvin-bot bot commented Jul 25, 2024

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

Copy link

melvin-bot bot commented Jul 25, 2024

The solution for this issue has been 🚀 deployed to production 🚀 in version 9.0.11-5 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-08-01. 🎊

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

  • @parasharrajat requires payment through NewDot Manual Requests
  • @dominictb requires payment (Needs manual offer from BZ)

Copy link

melvin-bot bot commented Jul 25, 2024

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:

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

@parasharrajat
Copy link
Member

parasharrajat commented Jul 25, 2024

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:

  • [@parasharrajat] The PR that introduced the bug has been identified. Link to the PR: Feat/dupe detection confirmation #42571
  • [@parasharrajat] 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: Under Beta feature.
  • [@parasharrajat] 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: NA
  • [@parasharrajat] Determine if we should create a regression test for this bug. Yes
  • [@parasharrajat] 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.

Regression Test Steps

  1. Go to ND
  2. Go to workspace chat.
  3. Submit an expense.
  4. Go to transaction thread.
  5. Click Description.
  6. Enter description and save it.
  7. The saved description will appear on Description row in transaction thread.

Do you agree 👍 or 👎 ?

@melvin-bot melvin-bot bot added Daily KSv2 and removed Weekly KSv2 labels Jul 31, 2024
@mallenexpensify
Copy link
Contributor

@dominictb can you please accept the job and reply here once you have?
https://www.upwork.com/jobs/~019f38e792188ee307

Copy link

melvin-bot bot commented Aug 1, 2024

Payment Summary

Upwork Job

BugZero Checklist (@mallenexpensify)

  • I have verified the correct assignees and roles are listed above and updated the neccesary manual offers
  • I have verified that there are no duplicate or incorrect contracts on Upwork for this job (https://www.upwork.com/ab/applicants/1815419992762713976/hired)
  • I have paid out the Upwork contracts or cancelled the ones that are incorrect
  • I have verified the payment summary above is correct

@mallenexpensify mallenexpensify removed their assignment Aug 1, 2024
@mallenexpensify mallenexpensify added Bug Something is broken. Auto assigns a BugZero manager. and removed Bug Something is broken. Auto assigns a BugZero manager. labels Aug 1, 2024
Copy link

melvin-bot bot commented Aug 1, 2024

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

@mallenexpensify
Copy link
Contributor

@johncschuster I'm off til Monday afternoon, can you help with payment here? Thx

@dominictb
Copy link
Contributor

@dominictb can you please accept the job and reply here once you have?

@mallenexpensify Done, thanks

@johncschuster
Copy link
Contributor

Payment Summary

Reviewer: @parasharrajat owed $250 via NewDot - please request payment
Contributor: @dominictb paid $250 via Upwork - PAID 👍

@parasharrajat
Copy link
Member

Payment requested as per #45830 (comment)

@JmillsExpensify
Copy link

$250 approved for @parasharrajat

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. Daily KSv2 Engineering 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
Status: Done
Development

No branches or pull requests

10 participants