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

[$250] Send invoice - Changing the room name in workspace invoice sends the report to skeleton view #41270

Closed
3 of 6 tasks
m-natarajan opened this issue Apr 30, 2024 · 13 comments
Assignees
Labels
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 Apr 30, 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: 1.4.68-0
Reproducible in staging?: Yes
Reproducible in production?: No (New feature)
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
Expensify/Expensify Issue URL:
Issue reported by: Applause internal team
Slack conversation:

Action Performed:

  1. Go to staging.new.expensify.com
  2. Go to FAB > Send invoice.
  3. Enter amount and select a participant.
  4. Create the invoice.
  5. Click on the workspace chat header.
  6. Go to Settings > Room name.
  7. Edit the room name and save it.

Expected Result:

App will not turn to skeleton.

Actual Result:

Changing the room name in workspace invoice sends the report to skeleton view.

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

Add any screenshot/video evidence

Bug6466062_1714436344742.room_skeleton.mp4

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~01079d9f6791e60b87
  • Upwork Job ID: 1785202638406352896
  • Last Price Increase: 2024-04-30
@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. labels Apr 30, 2024
Copy link

melvin-bot bot commented Apr 30, 2024

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

melvin-bot bot commented Apr 30, 2024

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

@github-actions github-actions bot added Engineering Hourly KSv2 and removed Daily KSv2 labels Apr 30, 2024
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.

@m-natarajan
Copy link
Author

We think this bug might be related to #wave-collect - Release 1

@m-natarajan
Copy link
Author

@muttmuure FYI I haven't added the External label as I wasn't 100% sure about this issue. Please take a look and add the label if you agree it's a bug and can be handled by external contributors.

@robertjchen robertjchen added Daily KSv2 and removed DeployBlockerCash This issue or pull request should block deployment Hourly KSv2 labels Apr 30, 2024
@robertjchen
Copy link
Contributor

Though not ideal, it does not appear to be a serious deploy blocker and can be addressable by external contributors 👍

@robertjchen robertjchen added the External Added to denote the issue can be worked on by a contributor label Apr 30, 2024
@melvin-bot melvin-bot bot changed the title Send invoice - Changing the room name in workspace invoice sends the report to skeleton view [$250] Send invoice - Changing the room name in workspace invoice sends the report to skeleton view Apr 30, 2024
Copy link

melvin-bot bot commented Apr 30, 2024

Job added to Upwork: https://www.upwork.com/jobs/~01079d9f6791e60b87

@melvin-bot melvin-bot bot added the Help Wanted Apply this label when an issue is open to proposals by contributors label Apr 30, 2024
Copy link

melvin-bot bot commented Apr 30, 2024

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

@bernhardoj
Copy link
Contributor

Proposal

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

Changing room name in an invoice report makes the report turns to skeleton loader view.

What is the root cause of that problem?

First of all, we are not supposed to be able to rename the invoice report. When we rename it, a new RENAMED (You renamed this room from ...) action is optimistically added. When the API request is completed, it breaks the getContinuousReportActionChain logic. getContinuousReportActionChain will build the chain of report actions based on previousReportActionID. If the current action previousReportActionID doesn't match the previous action ID, then the chain stops there.

In our case, the RENAMED action doesn't have previousReportActionID, so the chain only includes the RENAMED action. This only happens after the API request is completed because getContinuousReportActionChain will always include a pending action item and start the check from the non-pending action item.

This doesn't happen when we rename a chat room because the API request will give us the previousReportActionID for the RENAMED action.

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

Hide/disable the room name field when it's an invoice chat.

const shouldDisableRename = useMemo(() => ReportUtils.shouldDisableRename(report, linkedWorkspace), [report, linkedWorkspace]);
const isMoneyRequestReport = ReportUtils.isMoneyRequestReport(report);
const shouldDisableSettings = isEmptyObject(report) || ReportUtils.isArchivedRoom(report) || ReportUtils.isSelfDM(report);
const shouldShowRoomName = !ReportUtils.isPolicyExpenseChat(report) && !ReportUtils.isChatThread(report);

!ReportUtils.isInvoiceRoom(report)

@cristipaval
Copy link
Contributor

cristipaval commented Apr 30, 2024

This is #vip-billpay.

@danielrvidal, could you please help prioritise?

@danielrvidal
Copy link
Contributor

Yup, marking this as Critical as you should not be able to edit the room name. @ishpaul777 can you please prirotize this one to be reviewed and then picked up asap. It's needed for our release.

@danielrvidal danielrvidal moved this to Critical in [#whatsnext] #billpay Apr 30, 2024
@ishpaul777
Copy link
Contributor

I started reviewing @bernhardoj Proposal, RCA seems to be correct, the ideal solution seems to be Backend related i.e include previousReportActionID for RENAMED Action.

@cristipaval
Copy link
Contributor

Closing in favor of this one where we hide the fields that we do not want in the Settings page

@github-project-automation github-project-automation bot moved this from Critical to Done in [#whatsnext] #billpay Apr 30, 2024
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 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

7 participants