Skip to content

[HOLD for payment 2024-11-20] [Simple AA in NewDot] Submit to category and tag approvers #51001

Description

@Beamanator

If you haven’t already, check out our contributing guidelines for onboarding and email contributors@expensify.com to request to join our Slack channel!


Expensify/Expensify Issue URL: https://github.com/Expensify/Expensify/issues/430318

Action Performed:

  1. Create Control policy, with "Manual" scheduled submit, with Advanced Approvals enabled
  2. Submitter submitsTo policy owner
  3. Approver A set as Category Approver for Category CAT_APPROVER
  4. Submitter creates expense in workspace chat w/ Category CAT_APPROVER
  5. Submitter submits report

Expected Result:

Next manager (approver) should be Approver A

Actual Result:

Error, since we try to submit the report to policy owner (submitter's submitsTo)

Solution Guideline

In PolicyUtils.getSubmitToAccountID, for policies on CONST.POLICY.APPROVAL_MODE.ADVANCED, we currently assume that we should submit to employee.submitsTo ?? defaultApprover`.

However, in OldDot you'll notice that we actually want to submit the report to the category or tag approver before considering the submitter's submitsTo.

So we can either update getSubmitToAccountID to account for those additional approvers (assuming no other related regressions) OR we might have to create a new function for getting the "next submitter" in this case - the assigned contrib should evaluate existing uses of getSubmitToAccountID before determining which solution to follow

Platforms:

Which of our officially supported platforms is this issue occurring on?

  • Android: Standalone
  • Android: HybridApp
  • Android: mWeb Chrome
  • iOS: Standalone
  • iOS: HybridApp
  • iOS: mWeb Safari
  • MacOS: Chrome / Safari
  • MacOS: Desktop

View all open jobs on GitHub

Issue OwnerCurrent Issue Owner: @OfstadC

Metadata

Metadata

Labels

Awaiting PaymentAuto-added when associated PR is deployed to productionDailyKSv2ExternalAdded to denote the issue can be worked on by a contributorNewFeatureSomething to build that is a new item.

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