Skip to content

[Due for payment 2026-01-28] [$250] [AA Hold] Optimistically copy submission/approval related report actions to the new report after partial approval #74575

Description

@cristipaval

Held on the backend changes that copies these report actions to the newly created report.

Part of the Hold for Advanced Approval project

Main issue: #56386
Doc section: Here
Project: #migrate

Feature Description

When an approver only approves the unheld transactions on a report, and the held transactions are optimistically moved to a new report, we want to copy the submission/approval-related report actions to the newly created report.

This requires the App to pass optimistic IDs for the copies when hitting the ApproveMoneyRequest command. The command has a parameter named optimisticReportActionCopyIDs, and the App has to pass a string value representing the serialization of the JSON object containing the original reportActionIDs as keys and their copy reportActionIDs as values.
For example, let's suppose that the user partially approves an expense report that has:

  • a SUBMITTED report action having 11111 as reportActionID
  • a RETRACTED report action having 22222 as reportActionID
  • a SUBMITTED report action having 33333 as reportActionID

When partially approving it, the App optimistically creates copies of these report actions in the newly created report, where the held expenses are moved.
Let's suppose the optimistic IDs of the report action copies are:

  • 99999 for the copy of the first SUBMITTED action
  • 88888 for the copy of the RETRACTED action
  • 77777 for the copy of the second SUBMITTED action

The optimistic IDs for these report action copies will be passed to the ApproveMoneyRequest as a serialized JSON with the following keys and values:

{
   "11111": "99999",
   "22222": "88888",
   "33333": "77777"
}

Manual Test Steps

Automated Tests

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~021999074700388707831
  • Upwork Job ID: 1999074700388707831
  • Last Price Increase: 2025-12-11
Issue OwnerCurrent Issue Owner: @
Issue OwnerCurrent Issue Owner: @
Issue OwnerCurrent Issue Owner: @dylanexpensify

Metadata

Metadata

Labels

Awaiting PaymentAuto-added when associated PR is deployed to productionDailyKSv2ExternalAdded to denote the issue can be worked on by a contributor

Type

Projects

Status
Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions