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-05] [$250] Expense - Inconsistency in expense preview when deleting tracked expense & submitted expense offline #45247

Closed
6 tasks done
izarutskaya opened this issue Jul 11, 2024 · 44 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 External Added to denote the issue can be worked on by a contributor

Comments

@izarutskaya
Copy link

izarutskaya commented Jul 11, 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: 9.0.6-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: https://expensify.testrail.io/index.php?/tests/view/4700344
Logs: https://stackoverflow.com/c/expensify/questions/4856
Issue reported by: Applause-Internal team

Action Performed:

  1. Go to staging.new.expensify.com
  2. Go offline.
  3. Go to self DM.
  4. Track an expense in self DM.
  5. Delete the tracked expense in self DM.
  6. Note that the expense preview is crossed out.
  7. Go to DM with any chat.
  8. Submit an expense to the user.
  9. Delete the expense.

Expected Result:

The expense preview will be crossed out when deleting expense offline. The behavior will be consistent with deleting tracked expense in self DM offline.

Actual Result:

The expense preview is not crossed out when deleting expense offline. This is not consistent with deleting tracked expense in self DM offline.

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

Bug6538323_1720642157986.20240711_040528.mp4

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~01a18b3786ddabfcdd
  • Upwork Job ID: 1813279573925986534
  • Last Price Increase: 2024-07-16
  • Automatic offers:
    • ishpaul777 | Contributor | 103144778
    • nyomanjyotisa | Contributor | 103164028
Issue OwnerCurrent Issue Owner: @puneetlath
@izarutskaya izarutskaya added Daily KSv2 Bug Something is broken. Auto assigns a BugZero manager. labels Jul 11, 2024
Copy link

melvin-bot bot commented Jul 11, 2024

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

@izarutskaya
Copy link
Author

We think this issue might be related to the #collect project.

@nyomanjyotisa
Copy link
Contributor

nyomanjyotisa commented Jul 11, 2024

Proposal

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

Inconsistency in expense preview when deleting tracked expense & submitted expense offline

What is the root cause of that problem?

<Text style={styles.textHeadlineH1}>{getDisplayAmount()}</Text>

we don't add line-through here if the action is deleted like here

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

Add styles.lineThrough if is deleted here

const isDeleted = action?.pendingAction === CONST.RED_BRICK_ROAD_PENDING_ACTION.DELETE;
<Text style={[styles.textHeadlineH1, isDeleted && styles.lineThrough]}>{getDisplayAmount()}</Text>

What alternative solutions did you explore? (Optional)

If we want to strikethrough everything for both track expense and submit expense:

  1. Add styles.lineThrough if is deleted to the Submit Expense preview texts here and here
const isDeleted = action?.pendingAction === CONST.RED_BRICK_ROAD_PENDING_ACTION.DELETE;
<Text style={[styles.textHeadlineH1, isDeleted && styles.lineThrough]}>{getDisplayAmount()}</Text>
<Text style={[styles.textLabelSupporting, styles.lh16, isDeleted && styles.lineThrough]}>{getPreviewMessage()}</Text>
  1. Add styles.lineThrough if is deleted to the Track Expense preview first text here
<Text style={[styles.textLabelSupporting, styles.flex1, styles.lh16, isDeleted && styles.lineThrough]}>{getPreviewHeaderText()}</Text>

RESULT

Submit expense preview
image

Track expense preview
image

@tienifr
Copy link
Contributor

tienifr commented Jul 12, 2024

Proposal

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

  • The expense preview is not crossed out when deleting expense offline. This is not consistent with deleting tracked expense in self DM offline.

What is the root cause of that problem?

  • In here, we do not add:
                pendingFields: {
                    preview: 'delete',
                }

when the iou report will be deleted.

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

  • We should add:
                pendingFields: {
                    preview: 'delete',
                }

to here.

What alternative solutions did you explore? (Optional)

           pendingAction={iouReport?.pendingFields?.preview || action.pendingAction}

Optional:

            <OfflineWithFeedback
                pendingAction={action.pendingAction}
                shouldDisableStrikeThrough={!isDeleted}
                shouldDisableOpacity={!isDeleted}

@melvin-bot melvin-bot bot added the Overdue label Jul 15, 2024
Copy link

melvin-bot bot commented Jul 16, 2024

@MitchExpensify Eep! 4 days overdue now. Issues have feelings too...

@MitchExpensify MitchExpensify added the External Added to denote the issue can be worked on by a contributor label Jul 16, 2024
Copy link

melvin-bot bot commented Jul 16, 2024

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

@melvin-bot melvin-bot bot changed the title Expense - Inconsistency in expense preview when deleting tracked expense & submitted expense offline [$250] Expense - Inconsistency in expense preview when deleting tracked expense & submitted expense offline Jul 16, 2024
@melvin-bot melvin-bot bot added the Help Wanted Apply this label when an issue is open to proposals by contributors label Jul 16, 2024
Copy link

melvin-bot bot commented Jul 16, 2024

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

@melvin-bot melvin-bot bot removed the Overdue label Jul 16, 2024
@MitchExpensify MitchExpensify removed the Bug Something is broken. Auto assigns a BugZero manager. label Jul 16, 2024
@MitchExpensify MitchExpensify added the Bug Something is broken. Auto assigns a BugZero manager. label Jul 16, 2024
@MitchExpensify
Copy link
Contributor

Reassigning as I'm heading on leave 🙇

Copy link

melvin-bot bot commented Jul 16, 2024

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

@MitchExpensify MitchExpensify assigned ishpaul777 and unassigned OfstadC Jul 16, 2024
@melvin-bot melvin-bot bot removed the Help Wanted Apply this label when an issue is open to proposals by contributors label Jul 16, 2024
Copy link

melvin-bot bot commented Jul 16, 2024

📣 @ishpaul777 🎉 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 📖

@ishpaul777
Copy link
Contributor

@tienifr your solution doesn't seem to work for me, you might have mistakenly gave wrong link. Also for the alternative solution, i think we only want strikethrough style on amount like in track expense case not on all text

Screenshot 2024-07-18 at 2 34 49 AM

@ishpaul777
Copy link
Contributor

@nyomanjyotisa's proposal sound good and works as expected 👍

🎀 👀 🎀 C+ reviewed

@ishpaul777
Copy link
Contributor

@tienifr would you format your main solution to match #45247 (comment) behaviour, just for clarity

@tienifr
Copy link
Contributor

tienifr commented Jul 18, 2024

@ishpaul777 My proposal already matched that comment

@ishpaul777
Copy link
Contributor

ishpaul777 commented Jul 18, 2024

Oh you put it in optional, sorry my bad.

I am changing my recommendation since we aligned to apply strikethrough style on everything inside IOU and REPORTPREVIEW action when deleted optimistically.

@puneetlath please assign @tienifr 🙇

Sorry @nyomanjyotisa i think for new behavior tienifr's solution is better

@tienifr
Copy link
Contributor

tienifr commented Jul 19, 2024

PR #45758 is ready

@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 29, 2024
@melvin-bot melvin-bot bot changed the title [$250] Expense - Inconsistency in expense preview when deleting tracked expense & submitted expense offline [HOLD for payment 2024-08-05] [$250] Expense - Inconsistency in expense preview when deleting tracked expense & submitted expense offline Jul 29, 2024
Copy link

melvin-bot bot commented Jul 29, 2024

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

@melvin-bot melvin-bot bot removed the Reviewing Has a PR in review label Jul 29, 2024
Copy link

melvin-bot bot commented Jul 29, 2024

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

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

Copy link

melvin-bot bot commented Jul 29, 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:

  • [@ishpaul777] The PR that introduced the bug has been identified. Link to the PR:
  • [@ishpaul777] 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:
  • [@ishpaul777] 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:
  • [@ishpaul777] Determine if we should create a regression test for this bug.
  • [@ishpaul777] 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.
  • [@puneetlath] 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 Aug 5, 2024
@puneetlath
Copy link
Contributor

@ishpaul777 bump on the checklist please.

@ishpaul777
Copy link
Contributor

On my list will complete today 🙇

@ishpaul777
Copy link
Contributor

ishpaul777 commented Aug 7, 2024

[@ishpaul777] The PR that introduced the bug has been identified. Link to the PR: I could not find a specific PR that introduced this bug. blame history didn't help this was like this from the begining, i think we should not block it on this.
[@ishpaul777] 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
[@ishpaul777] 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
[@ishpaul777] Determine if we should create a regression test for this bug.- Yes
[@ishpaul777] 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 Proposal

  1. Open newdot
  2. Go offline.
  3. Go to self DM.
  4. Track an expense in self DM.
  5. Delete the tracked expense in self DM.

Expected Result:

The tracked expense preview will be crossed out when deleting expense offline

  1. Go to DM with any chat.
  2. Submit an expense to the user.
  3. Delete the expense.

Expected Result:

The expense preview will be crossed out when deleting expense offline

Do we agree 👍 or 👎 ?

@melvin-bot melvin-bot bot added the Overdue label Aug 7, 2024
@puneetlath
Copy link
Contributor

Payment summary:

Thanks everyone!

@melvin-bot melvin-bot bot removed the Overdue label Aug 8, 2024
@github-project-automation github-project-automation bot moved this from Polish to Done in [#whatsnext] #wave-collect Aug 8, 2024
@garrettmknight
Copy link
Contributor

$250 approved for @tienifr

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 External Added to denote the issue can be worked on by a contributor
Projects
No open projects
Status: Done
Development

No branches or pull requests