Skip to content

[Awaiting Payment 6th September] ApproveMoneyRequest is failing when there is no nextReceiver #47936

@garrettmknight

Description

@garrettmknight

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: N/A
Reproducible in staging?: N/A
Reproducible in production?: N/A
If this was caught during regression testing, add the test name, ID and link from TestRail:
Logs: https://stackoverflow.com/c/expensify/questions/4856
Expensify/Expensify Issue URL: https://github.com/Expensify/Expensify/issues/393839
Issue reported by: @JmillsExpensify
Slack conversation: https://expensify.slack.com/archives/C05LX9D6E07/p1724422284086239?thread_ts=1724364263.668779&cid=C05LX9D6E07

Action Performed:

  1. Create a Control workspace on OldDot.
  2. Enable Advanced Approval
  3. Invite a submitter and an approver, we'll call them Approver A
  4. Set the submitter's submitsTo as Approver A
  5. As the submitter, submit an expense to the workspace chat.
  6. As the Admin, change the Submitter’s submitsTo to yourself, verify you have no forwardsTo set
  7. As Approver A, log in and open the report chat.

Expected Result:

Approver A should be able to see the 'Approve' button and tapping it should final approve the report.

Actual Result:

  • In the ApproveMoneyRequest we are now building the approvalChain based on the submitter
  • That is Admin in this case.
  • This means Approver A is not flagged as finalApprover (as they should be)
  • And that leads to check if the nextReceiver is the current manager (we should have never got here)
  • that fails as there is no nextReceiver hence the 500 error

Workaround:

None

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

View all open jobs on GitHub

Issue OwnerCurrent Issue Owner: @trjExpensify

Metadata

Metadata

Labels

Awaiting PaymentAuto-added when associated PR is deployed to productionBugSomething is broken. Auto assigns a BugZero manager.DailyKSv2InternalRequires API changes or must be handled by Expensify staff

Type

No type
No fields configured for issues without a type.

Projects

Status
Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions