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

'Auth UpdateReportComment returned an error' message on deleting userB's thread message in requested money detail #25549

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

Comments

@kavimuru
Copy link

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. Log in to userA's account.
  2. Open userB's chat.
  3. Navigate to the "Request money" section.
  4. Enter an amount and send a money request.
  5. Click on the requested money to view its details.
  6. In a separate browser, log in using userB's account.
  7. Open the chat with userA, then click in requested money for detail.
  8. Send a thread message in the requested money detail page.
  9. Return to userA's account.
  10. Delete the thread message sent by userB.

Expected Result:

When the thread message sent by userB is deleted, there should be no display of the error message 'Auth UpdateReportComment returned an error'

Actual Result:

Upon deleting the thread message from userB in the requested money detail, the error message 'Auth UpdateReportComment returned an error' is displayed

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.55-2
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

screen-recording-2023-08-10-at-34629-am_w3GQF1cD.1.mp4
Recording.5944.2.mp4

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

View all open jobs on GitHub

@dukenv0307
Copy link
Contributor

Proposal

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

'Auth UpdateReportComment returned an error' message on deleting userB's thread message in requested money detail

What is the root cause of that problem?

We can see the delete comment option when hovering other user comment in the Request Money detail
In ReportUtils, when we open the Request Money detail, the policy.role will be admin

https://github.com/Expensify/App/blob/4ac83edc0cd5ba07b2ac31b55b9f8ccf7560c705/src/libs/ReportUtils.js#L273C5-L273C52

Therefore, shouldShow in ContextMenuActions deleteAction will be true and show the deletion option when we hover other user's message

https://github.com/Expensify/App/blob/4ac83edc0cd5ba07b2ac31b55b9f8ccf7560c705/src/pages/home/report/ContextMenu/ContextMenuActions.js#L292C1-L298

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

We should only allow deletion if it is not IOU report like this:

return policy.role === CONST.POLICY.ROLE.ADMIN && !isIOUReport(report);

What alternative solutions did you explore? (Optional)

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

melvin-bot bot commented Aug 20, 2023

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

@melvin-bot
Copy link

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

@DylanDylann
Copy link
Contributor

This issue is fixed by this PR: #24396

@lschurr
Copy link
Contributor

lschurr commented Aug 21, 2023

Great, closing this one.

@lschurr lschurr closed this as completed Aug 21, 2023
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

4 participants