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

Web - Request money - Delete request reopens on deleting message in it and again deleting it triggers red dot error #24413

Closed
1 of 6 tasks
izarutskaya opened this issue Aug 11, 2023 · 10 comments
Assignees
Labels
Bug Something is broken. Auto assigns a BugZero manager. Daily KSv2

Comments

@izarutskaya
Copy link

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 app
  2. Click on plus and click on request money
  3. Enter any amount, select any user and complete the request
  4. In the user report, click on request money message
  5. Again click on request money message and send any message in the report
  6. Click on 3 dot and click on delete request, it should display [deleted request] in header after it
  7. Delete the message sent in step 5 and observe that request again gets reverted to active.
  8. Again click on 3 dots and delete request, observe that it triggers red dot error in its parent thread

Expected Result:

App should not activate deleted request on deleting any message inside deleted request

Actual Result:

App activates deleted request on deleting any message inside deleted request and on again trying to delete, triggers red dot error in parent thread

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: v1.3.53-1

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

reactivated.deleted.request.on.deleting.message.mp4
Recording.1170.mp4

Expensify/Expensify Issue URL:

Issue reported by: @dhanashree-sawant

Slack conversation: https://expensify.slack.com/archives/C049HHMV9SM/p1691058072347819

View all open jobs on GitHub

@izarutskaya izarutskaya added Daily KSv2 Bug Something is broken. Auto assigns a BugZero manager. labels Aug 11, 2023
@melvin-bot
Copy link

melvin-bot bot commented Aug 11, 2023

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

@melvin-bot
Copy link

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

@dukenv0307
Copy link
Contributor

dukenv0307 commented Aug 11, 2023

Proposal

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

Request money - Delete request reopens on deleting message in it and again deleting it triggers red dot error

What is the root cause of that problem?

We have two errors here

  1. Inconsistent header when the request money is deleted or not

When the request money is deleted, the header render HeaderView because isDeletedParentAction is true. That makes the avatar can clickable, and after clicking on this the detail page appears

if (isSingleTransactionView && !isDeletedParentAction) {
headerView = (
<MoneyRequestHeader

  1. The title of the header is wrong when we delete the message of the request money report

In getTransactionReportName function, we use ReportActionsUtils.isDeletedParentAction function to check whether the report action is deleted or not

App/src/libs/ReportUtils.js

Lines 1258 to 1260 in dd0d98f

if (ReportActionsUtils.isDeletedParentAction(reportAction)) {
return Localize.translateLocal('parentReportAction.deletedRequest');
}

When we delete the only message of the report, because childVisibleActionCount is updated to 0, this function returns false and then the title of the header is wrong

return lodashGet(reportAction, ['message', 0, 'isDeletedParentAction'], false) && lodashGet(reportAction, 'childVisibleActionCount', 0) > 0;

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

  1. We should always display MoneyRequestHeader for transaction view to make the avatar cannot clickable.
if (isSingleTransactionView) {
    headerView = (
        <MoneyRequestHeader
        ....

if (isSingleTransactionView && !isDeletedParentAction) {
headerView = (
<MoneyRequestHeader

And in MoneyRequestHeader we will hide the three-dot if the money request is deleted

shouldShowThreeDotsButton={!isPayer && !isSettled && !ReportActionsUtils.isDeletedAction(parentReportAction)}

shouldShowThreeDotsButton={!isPayer && !isSettled}

2. In getTransactionReportName, we should use ReportActionsUtils.isDeletedAction to check whether the action is deleted or not instead of using isDeletedParentAction function

if (ReportActionsUtils.isDeletedAction(reportAction)) {
    return Localize.translateLocal('parentReportAction.deletedRequest');
}

App/src/libs/ReportUtils.js

Lines 1258 to 1260 in dd0d98f

if (ReportActionsUtils.isDeletedParentAction(reportAction)) {
return Localize.translateLocal('parentReportAction.deletedRequest');
}

What alternative solutions did you explore? (Optional)

NA

Result

Screencast.from.11-08-2023.18.30.35.webm

@melvin-bot melvin-bot bot added the Overdue label Aug 14, 2023
@muttmuure
Copy link
Contributor

Handling after higher priorities

@melvin-bot melvin-bot bot added Overdue and removed Overdue labels Aug 14, 2023
@melvin-bot
Copy link

melvin-bot bot commented Aug 22, 2023

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

@muttmuure
Copy link
Contributor

Will handle this week

@melvin-bot melvin-bot bot removed the Overdue label Aug 22, 2023
@melvin-bot
Copy link

melvin-bot bot commented Aug 25, 2023

@muttmuure 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!

@melvin-bot melvin-bot bot added the Overdue label Aug 25, 2023
@melvin-bot
Copy link

melvin-bot bot commented Aug 28, 2023

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

@muttmuure
Copy link
Contributor

Having trouble getting into expensifail.com
image

@melvin-bot melvin-bot bot removed the Overdue label Aug 29, 2023
@muttmuure
Copy link
Contributor

I tried this and it looks like we fixed it somewhere else. The request got zeroed out:
image

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. Daily KSv2
Projects
None yet
Development

No branches or pull requests

3 participants