Skip to content

Commit

Permalink
Merge pull request #20753 from BeeMargarida/personalDetailsList-migra…
Browse files Browse the repository at this point in the history
…tion-revert

Personal details list migration: revert fallback for getDisplayNameForParticipant
  • Loading branch information
Beamanator authored Jun 14, 2023
2 parents ee294de + d868df8 commit d6beb85
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/libs/ReportUtils.js
Original file line number Diff line number Diff line change
Expand Up @@ -832,7 +832,6 @@ function getAccountIDForLogin(login) {

/**
* Get the displayName for a single report participant.
* Defaults to login if no display name is set.
*
* @param {Number} accountID
* @param {Boolean} [shouldUseShortForm]
Expand All @@ -843,7 +842,7 @@ function getDisplayNameForParticipant(accountID, shouldUseShortForm = false) {
return '';
}
const personalDetails = getPersonalDetailsForAccountID(accountID);
const longName = personalDetails.displayName || (personalDetails.login && Str.removeSMSDomain(personalDetails.login));
const longName = personalDetails.displayName;
const shortName = personalDetails.firstName || longName;
return shouldUseShortForm ? shortName : longName;
}
Expand Down

0 comments on commit d6beb85

Please sign in to comment.