diff --git a/src/libs/ReportUtils.ts b/src/libs/ReportUtils.ts index cca52ac37c9d..c2f251df6307 100644 --- a/src/libs/ReportUtils.ts +++ b/src/libs/ReportUtils.ts @@ -3318,9 +3318,9 @@ function getInvoicesChatName(report: OnyxEntry): string { /** * Get the title for a report. */ -function getReportName(report: OnyxEntry, policy?: OnyxEntry): string { +function getReportName(report: OnyxEntry, policy?: OnyxEntry, parentReportActionParam?: OnyxInputOrEntry): string { let formattedName: string | undefined; - const parentReportAction = ReportActionsUtils.getParentReportAction(report); + const parentReportAction = parentReportActionParam ?? ReportActionsUtils.getParentReportAction(report); if (isChatThread(report)) { if (!isEmptyObject(parentReportAction) && ReportActionsUtils.isTransactionThread(parentReportAction)) { formattedName = getTransactionReportName(parentReportAction); diff --git a/src/libs/actions/Report.ts b/src/libs/actions/Report.ts index e528fde34ffe..73c2daf1e48e 100644 --- a/src/libs/actions/Report.ts +++ b/src/libs/actions/Report.ts @@ -1538,6 +1538,7 @@ function editReportComment(reportID: string, originalReportAction: OnyxEntry