Correctly display first name for IOU requests#12184
Conversation
|
Having some trouble testing in mobile, but it should work fine across platforms. Trying again tomorrow, anyways |
src/libs/actions/IOU.js
Outdated
| * @param {String} comment | ||
| */ | ||
| function requestMoney(report, amount, currency, recipientEmail, debtorEmail, comment) { | ||
| function requestMoney(report, amount, currency, recipientEmail, debtorEmail, debtorName = '', comment = '') { |
There was a problem hiding this comment.
Not sure why we need default empty values here.
There was a problem hiding this comment.
I don't think they'll always be available. Mostly a sanity check
There was a problem hiding this comment.
This function is used only once and already state.comment initial value is '' and fallback value for debatorName is also '' i.e if firstName is missing then we passed '' as default value in lodash
There was a problem hiding this comment.
That's fair. Removed.
|
|
There was a problem hiding this comment.
Other wise looks good! Need to test on android #12184 (comment)
Santhosh-Sellavel
left a comment
There was a problem hiding this comment.
Screenshots: #12184 (comment)
Checklist: #12184 (comment)
LGTM!
C+ Reviewed
🎀 👀 🎀
d3eae9a
src/pages/iou/IOUModal.js
Outdated
There was a problem hiding this comment.
selectedParticipants[0] or this.state.participants[0]
There was a problem hiding this comment.
selectedParticipants[0] works :)
|
Large changes after conflict resolution, but it is way simpler now. |
Santhosh-Sellavel
left a comment
There was a problem hiding this comment.
Looks good, tests pass!
all you @youssef-lr
|
Conflicts solved (again!). |
src/libs/ReportUtils.js
Outdated
| const amount = NumberFormatUtils.format(preferredLocale, total / 100, {style: 'currency', currency}); | ||
| const isMultipleParticipantReport = participants.length > 1; | ||
| const displayNames = _.map(participants, participant => getDisplayNameForParticipant(participant.login, isMultipleParticipantReport) || participant.login); | ||
| const displayNames = _.map(participants, participant => getDisplayNameForParticipant(allPersonalDetails[participant.login], true) || participant.login); |
There was a problem hiding this comment.
This is a throwing a text.replace is not function for me. Due to the change here, getDisplayNameForParticipant now expects a string instead of the participant object.
There was a problem hiding this comment.
Oh, you are completely right!
Fixed and tested. Seems to be working!
|
Left a comment @Gonals |
Addressed! All yours! |
|
@youssef-lr looks like this was merged without the checklist test passing. Please add a note explaining why this was done and remove the |
|
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
|
🚀 Deployed to staging by @youssef-lr in version: 1.2.24-0 🚀
|
|
🚀 Deployed to production by @yuwenmemon in version: 1.2.24-4 🚀
|
1 similar comment
|
🚀 Deployed to production by @yuwenmemon in version: 1.2.24-4 🚀
|
|
🚀 Deployed to production by @yuwenmemon in version: 1.2.24-4 🚀
|
|
@Gonals Can you tag a BZ here, to track payment for C+ Review?
|
|
Not sure why the checks show that the workflow didn't run, but this wasn't an emergency. |




Details
Fixed Issues
$ https://github.com/Expensify/Expensify/issues/233534
Tests

5. Repeat steps 1-5 but requesting money from an account with no name. 6. Confirm the email displays instead:QA Steps
Same as tests
PR Review Checklist
PR Author Checklist
### Fixed Issuessection aboveTestssectionQA stepssectiontoggleReportand notonIconClick)src/languages/*filesWaiting for Copylabel for a copy review on the original GH to get the correct copy.STYLE.md) were followedAvatar, I verified the components usingAvatarare working as expected)/** comment above it */thisproperly so there are no scoping issues (i.e. foronClick={this.submit}the methodthis.submitshould be bound tothisin the constructor)thisare necessary to be bound (i.e. avoidthis.submit = this.submit.bind(this);ifthis.submitis never passed to a component event handler likeonClick)StyleUtils.getBackgroundAndBorderStyle(themeColors.componentBG)Avataris modified, I verified thatAvataris working as expected in all cases)PR Reviewer Checklist
The reviewer will copy/paste it into a new comment and complete it after the author checklist is completed
### Fixed Issuessection aboveTestssectionQA stepssectiontoggleReportand notonIconClick).src/languages/*filesWaiting for Copylabel for a copy review on the original GH to get the correct copy.STYLE.md) were followedAvatar, I verified the components usingAvatarhave been tested & I retested again)/** comment above it */thisproperly so there are no scoping issues (i.e. foronClick={this.submit}the methodthis.submitshould be bound tothisin the constructor)thisare necessary to be bound (i.e. avoidthis.submit = this.submit.bind(this);ifthis.submitis never passed to a component event handler likeonClick)StyleUtils.getBackgroundAndBorderStyle(themeColors.componentBG)Avataris modified, I verified thatAvataris working as expected in all cases)Screenshots
Web
Desktop
iOS
Android