Closed izarutskaya closed 11 months ago
Triggered auto assignment to @zanyrenney (Bug
), see https://stackoverflow.com/c/expensify/questions/14418 for more details.
Job added to Upwork: https://www.upwork.com/jobs/~018d28ed12ed77a99a
Platforms
in OP are ✅)Triggered auto assignment to Contributor-plus team member for initial proposal review - @ntdiary (External
)
Split - Contact method of the participants is shown in Merchant instead of display name
In
We are using participant.login
instead of participant.text
, which is displaying contact method.
Use participant.text
instead of participant.text
in the given line.
And maybe somehow use current user display name instead of currentUserLogin.
When adding a money request manually and selecting participants, the report details show the participants' email addresses in the merchant field.
Root cause is that when adding transaction for split bill then following line of code uses user's login for generating Bill Split with string.
Use getDisplayName
so instead of currentUserLogin
we need to use getDisplayName(currentUserLogin, currentUserPersonalDetails)
and instead of participant.login
we need to use getDisplayName(participant.login, participant)
const formattedParticipants = isOwnPolicyExpenseChat
? [currentUserLogin, ReportUtils.getReportName(splitChatReport)]
: Localize.arrayToString([getDisplayName(currentUserLogin, currentUserPersonalDetails), ..._.map(participants, (participant) => getDisplayName(participant.login, participant) || '')]);
We also need to ensure that if a user updates their display name from their profile, the transaction gets updated with the new display name. To achieve this, we should generate the formatted string as mentioned above before displaying the data OR update transactions merchant field as soon as user updates his or her profile, other than storing it in Onyx as follows:
Nope, this is not reproducible, I suspect it has been fixed elsewhere or is an older bug:
@zanyrenney This is still reproducible You have to complete the split request first Then we have to check in preview
Issue is still reproducible on build 1.3.88-3
https://github.com/Expensify/App/assets/78819774/db3397f3-8c18-4341-a44d-3c2b72857b22
Thanks for the additional step @shubham1206agra
@ntdiary please can you review the initial proposals we have received?
Hey, @zanyrenney, sorry for the delay, there are two other issues I need to handle. I estimate I'll have time to review this issue in 24 hours, so If it's urgent, please feel free to reassign another C+. 😂
under review
@zanyrenney, I feel the expected behavior in the OP may not be what we want. In my testing, I saw different behavior: when I reopen the split report and detail page, the Merchant
field always shows Request
, even if I enter demo
when creating it. So this feature may still be unstable, it would be better to confirm the expected behavior with our internal engineers first.
https://github.com/Expensify/App/assets/8579651/0d7774c1-0228-4e81-b133-588ae8ea93c5
📣 It's been a week! Do we have any satisfactory proposals yet? Do we need to adjust the bounty for this issue? 💸
Thanks @ntdiary I will ask for a second opinion here!
We had same discussion - https://github.com/Expensify/App/issues/25885#issuecomment-1699762925 Maybe related to https://github.com/Expensify/Expensify/issues/301281
when I reopen the split report and detail page, the Merchant field always shows Request, even if I enter demo when creating it.
Issue 2: Suppose the 1st issue is fixed (just to reduce the complexity): When going to MoneyRequestConfirmPage, we are always displaying the merchant field as "Request", but then the user clicks on the submit button, the actual data is passed to API 'SplitBill' is : https://github.com/Expensify/App/blob/5b5d465f9d39e01468db731ad5d278b026a8a565/src/libs/actions/IOU.js#L927
Issue 3: We are using the below logic to generate merchant with string, that uses participant.login: https://github.com/Expensify/App/blob/5b5d465f9d39e01468db731ad5d278b026a8a565/src/libs/actions/IOU.js#L915-L917
Issue 1: We should pass the merchant data to 'SplitBill' API, this one is straightforward to implement.
Issue 2: When clicking on "Add to split" button to navigate to MoneyRequestConfirmPage, we need to update the iou data by updating the below logic: https://github.com/Expensify/App/blob/5b5d465f9d39e01468db731ad5d278b026a8a565/src/pages/iou/steps/MoneyRequstParticipantsPage/MoneyRequestParticipantsPage.js#L77-L80 to
const navigateToConfirmationStep = (moneyRequestType) => {
IOU.setMoneyRequestMerchant(getSplitBillMerchant(props.iou.participants))
...
};
getSplitBillMerchant
is util function that we use to get the merchant and based on what we did to get the LHNRow and Report`s header in case of group chat. It can be something like:
const getSplitBillMerchant = (participants, currentUserLogin, isOwnPolicyExpenseChat) => {
if (isOwnPolicyExpenseChat) return [currentUserLogin, ReportUtils.getReportName(splitChatReport)];
const participantPersonalDetails = OptionsListUtils.getPersonalDetailsForAccountIDs(participants, allPersonalDetails);
const displayNamesWithTooltips = getDisplayNamesWithTooltips(participantPersonalDetails, true);
return getDisplayNamesStringFromTooltips(displayNamesWithTooltips);
};
merchant
with merchant is from iou rather than using the default merchant data.Issue 3: Using the above getSplitBillMerchant
fixed this issue as well
@aimane-chnaif I just checked This is not a dupe
@aimane-chnaif My proposal mention 3 related issue https://github.com/Expensify/App/issues/29858#issuecomment-1786463262 So should we need to fix each issue in separate PR or wrap these into one?
@ntdiary @zanyrenney this issue was created 2 weeks ago. Are we close to approving a proposal? If not, what's blocking us from getting this issue assigned? Don't hesitate to create a thread in #expensify-open-source to align faster in real time. Thanks!
📣 It's been a week! Do we have any satisfactory proposals yet? Do we need to adjust the bounty for this issue? 💸
Hmm, I think this is a dupe of https://github.com/Expensify/App/issues/29691
I see the comment above, but closing on these grounds.
@zanyrenney it's not a dupe. Please help check my proposal for more detail.
@ntdiary Can you help confirm.
@DylanDylann please check https://github.com/Expensify/App/issues/29858#issuecomment-1785886524. This will be handled internally. cc: @youssef-lr
@situchan My proposal mentioned 3 related issues. What issue that you mentioned in "This will be handled internally"?
@youssef-lr will decide as he's leading split bill project. Please hold on and wait for update.
@situchan Yeah. Many thanks. But I have a minor question, In the link you mentioned, I just can access the https://github.com/Expensify/App/issues/25885, and the issue mentioned in that does not appear anymore and does not relate to this issue.
@DylanDylann this is getting fixed here https://github.com/Expensify/App/pull/30721
Expected Result:
Display name of the participants will be displayed in the Merchant.
I feel the expected behavior in the OP may not be what we want.
As I mentioned before, this is not so much a bug but rather a feature request, and likely one that would not get approved. 😂 So it's fine to just fix the merchant field saving problem.
@ntdiary My proposal also mentioned an issue that if user updates his account details then merchant field does not gets updated with his new email address or display name what ever we need to show there.
If you haven’t already, check out our contributing guidelines for onboarding and email contributors@expensify.com to request to join our Slack channel!
Issue found when executing PR: https://github.com/Expensify/App/pull/29449
Version Number: v1.3.86-1 Reproducible in staging?: Y Reproducible in production?: Y If this was caught during regression testing, add the test name, ID and link from TestRail: Email or phone of affected tester (no customers): Logs: https://stackoverflow.com/c/expensify/questions/4856 Expensify/Expensify Issue URL: Issue reported by: Applause-Internal Team Slack conversation: @
Action Performed:
Expected Result:
Display name of the participants will be displayed in the Merchant.
Actual Result:
Contact method of the participants is displayed in the Merchant.
Workaround:
Unknown
Platforms:
Which of our officially supported platforms is this issue occurring on?
Screenshots/Videos
Android: Native
Android: mWeb Chrome
iOS: Native
iOS: mWeb Safari
MacOS: Chrome / Safari
https://github.com/Expensify/App/assets/115492554/3cd10f75-d226-4752-9e43-0076d61c9712MacOS: Desktop
View all open jobs on GitHub
Upwork Automation - Do Not Edit