From 166a98b5e4efcd40b3c1e66d79803c3d784ab7a7 Mon Sep 17 00:00:00 2001 From: Daniel Gale-Rosen Date: Fri, 3 Nov 2023 12:23:02 -0400 Subject: [PATCH 1/2] show displayName if primary is workspace --- src/pages/home/report/ReportActionItemSingle.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pages/home/report/ReportActionItemSingle.js b/src/pages/home/report/ReportActionItemSingle.js index 2b4526af98d1..6f6d1f1fe592 100644 --- a/src/pages/home/report/ReportActionItemSingle.js +++ b/src/pages/home/report/ReportActionItemSingle.js @@ -108,7 +108,7 @@ function ReportActionItemSingle(props) { // If this is a report preview, display names and avatars of both people involved let secondaryAvatar = {}; - const primaryDisplayName = ReportUtils.getDisplayNameForParticipant(actorAccountID); + const primaryDisplayName = isWorkspaceActor ? displayName : ReportUtils.getDisplayNameForParticipant(actorAccountID); if (displayAllActors) { // The ownerAccountID and actorAccountID can be the same if the a user requests money back from the IOU's original creator, in that case we need to use managerID to avoid displaying the same user twice const secondaryAccountId = props.iouReport.ownerAccountID === actorAccountID ? props.iouReport.managerID : props.iouReport.ownerAccountID; From 600a8d37e24c0e1dcd922c9b2731c35c4b90cb45 Mon Sep 17 00:00:00 2001 From: Daniel Gale-Rosen Date: Fri, 3 Nov 2023 12:53:06 -0400 Subject: [PATCH 2/2] simplify, account for copilot --- src/pages/home/report/ReportActionItemSingle.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pages/home/report/ReportActionItemSingle.js b/src/pages/home/report/ReportActionItemSingle.js index 6f6d1f1fe592..e9e1ef39e417 100644 --- a/src/pages/home/report/ReportActionItemSingle.js +++ b/src/pages/home/report/ReportActionItemSingle.js @@ -108,7 +108,7 @@ function ReportActionItemSingle(props) { // If this is a report preview, display names and avatars of both people involved let secondaryAvatar = {}; - const primaryDisplayName = isWorkspaceActor ? displayName : ReportUtils.getDisplayNameForParticipant(actorAccountID); + const primaryDisplayName = displayName; if (displayAllActors) { // The ownerAccountID and actorAccountID can be the same if the a user requests money back from the IOU's original creator, in that case we need to use managerID to avoid displaying the same user twice const secondaryAccountId = props.iouReport.ownerAccountID === actorAccountID ? props.iouReport.managerID : props.iouReport.ownerAccountID;