Closed lanitochka17 closed 1 month ago
Triggered auto assignment to @lschurr (Bug
), see https://stackoverflow.com/c/expensify/questions/14418 for more details. Please add this bug to a GH project, as outlined in the SO.
We think that this bug might be related to #vip-vsp
@lschurr FYI I haven't added the External label as I wasn't 100% sure about this issue. Please take a look and add the label if you agree it's a bug and can be handled by external contributors
We think that this bug might be related to #vip-vsp
Group - New users are not displayed in group name
In this case, we use ReportUtils.getGroupChatName
function to get group name
And in ReportUtils.getGroupChatName
function, we use getDisplayNameForParticipant
function
The getDisplayNameForParticipant
function return empty string, because the App can't find accountID of new user in personalDetail
We need to add a fallback value when the App can't find accountID of new user in personalDetail
. Keep in mind that the new user's email is stored in newGroupDraft.participants
In getGroupChatName
function, we can replace participantAccountIDs
param into participant
param. This participant
parameter will contain both the accountID and the login field, allowing us to use participant.login
as a default value.
Additional, we maybe need to apply the same solution in here
Result:
We can introduce new param in getDisplayNameForParticipant
function called participant
. And then if the App can't find accountID of new user in personalDetail
, we will use participant.login
as a default value
I have implemented my solution locally and included the results as evidence in my proposal
Job added to Upwork: https://www.upwork.com/jobs/~01511ab0ad63b9289d
Triggered auto assignment to Contributor-plus team member for initial proposal review - @hoangzinh (External
)
New users are not displayed in group name Reproducible on these devises: Samsung galaxy Ao2s/12 - Chrome. Redmi note 10s/Android 13, Samsung Galaxy m2/Android 12
If we select a new user on offline mode or select a new user before SearchForReports
API is complete, the personal details of this user don't exist in Onyx. So getDisplayNameForParticipant
returns an empty string here and then the new user doesn't display in the group chat name.
getDisplayNameForParticipant
function is used in many places of the app so we should handle to fallback the login in getGroupChatName
function as a special case instead of handling it in getDisplayNameForParticipant
function.
newGroupDraft.partipants
here instead of passing the array accountID of the group chat.function getGroupChatName(draftParticipants?: SelectedParticipant[], shouldApplyLimit = false, report?: OnyxEntry<Report>): string | undefined {
let participants = draftParticipants?.map((participant) => participant.accountID) ?? Object.keys(report?.participants ?? {}).map(Number);
participants
data of the group to fallback here if the getDisplayNameForParticipant
function returns an empty string.getDisplayNameForParticipant(participant, isMultipleParticipantReport) || draftParticipants?.[index]?.login
const groupName = newGroupDraft?.reportName ? newGroupDraft?.reportName : ReportUtils.getGroupChatName(newGroupDraft?.participants);
const existingReportName = useMemo(
() => (report ? ReportUtils.getGroupChatName(undefined, false, report) : ReportUtils.getGroupChatName(groupChatDraft?.participants)),
[groupChatDraft?.participants, report],
);
Thanks for proposals, everyone. @nkdengineer's proposal looks good to me
Link to proposal https://github.com/Expensify/App/issues/46502#issuecomment-2258799397
🎀👀🎀 C+ reviewed
Triggered auto assignment to @stitesExpensify, see https://stackoverflow.com/c/expensify/questions/7972 for more details.
@hoangzinh
His solution is safer and similar with other places
This also be mentioned in my proposal
His solution is safer and similar with other places
@hoangzinh What are the differences between my proposal and @nkdengineer's proposal? I notice that @nkdengineer's proposal is more detailed, but the main idea is the same.
Ah @cretadn22 I didn't mean @nkdengineer's proposal has more details than yours. But:
His RCA is deeper than yours. For example, in your RCA you mentioned to "The getDisplayNameForParticipant function return empty string, because the App can't find accountID of new user in personalDetail", but why the App can't find accountID for new user? @nkdengineer explained it well
If we select a new user on offline mode or select a new user before SearchForReports API is complete, the personal details of this user don't exist in Onyx.
About solution, there is a difference between 2 proposals, you proposed a solution to change the value that passes in getDisplayNameForParticipant
func, because this func is used in many other places, so compared with @nkdengineer's solution, it looks safer.
Btw, as a new contributor, your proposal looks good.
In getDisplayNameForParticipant function, we can replace participantAccountIDs param into participant param. This participant parameter will contain both the accountID and the login field, allowing us to use participant.login as a default value.
Ahhh, This is my mistake, I mean getGroupChatName
function
The rest is correct to getGroupChatName, I only make mistake about function name
we can replace participantAccountIDs param into participant param. This participant parameter will contain both the accountID and the login field, allowing us to use participant.login as a default value.
This is my local implementation for the proposal. I have made code changed and thoroughly tested it before posting proposal, and I’ve included an image of the result in my proposal.
Yeah, but according to Contributing guides, I can only select 1 proposal that's earliest provided, best proposed solution + RCA. Let's wait for the internal engineer to review it.
This is a tough one, but I agree that @nkdengineer should get the job for the reasons Vinh mentioned here
📣 @hoangzinh 🎉 An offer has been automatically sent to your Upwork account for the Reviewer role 🎉 Thanks for contributing to the Expensify app!
📣 @nkdengineer 🎉 An offer has been automatically sent to your Upwork account for the Contributor role 🎉 Thanks for contributing to the Expensify app!
Offer link Upwork job Please accept the offer and leave a comment on the Github issue letting us know when we can expect a PR to be ready for review 🧑💻 Keep in mind: Code of Conduct | Contributing 📖
This issue has not been updated in over 15 days. @hoangzinh, @lschurr, @stitesExpensify, @nkdengineer eroding to Monthly issue.
P.S. Is everyone reading this sure this is really a near-term priority? Be brave: if you disagree, go ahead and close it out. If someone disagrees, they'll reopen it, and if they don't: one less thing to do!
Not overdue. The PR has been merged to Production since last week. Ready for payment. I will complete BZ checklist soon
@lschurr This is ready for payment for a while, could you help to apply the Daily label? TIA
Hi folks! Sorry, I was OOO last week. Handling payments now.
Payment summary:
If you haven’t already, check out our contributing guidelines for onboarding and email contributors@expensify.com to request to join our Slack channel!
Version Number: 9.0.14 Reproducible in staging?: Y Reproducible in production?: Y If this was caught during regression testing, add the test name, ID and link from TestRail: N/A Email or phone of affected tester (no customers): https://expensify.testrail.io/index.php?/tests/view/4784615 Issue reported by: Applause - Internal Team
Action Performed:
Expected Result:
New users must be displayed in group name
Actual Result:
New users are not displayed in group name Reproducible on these devises: Samsung galaxy Ao2s/12 - Chrome. Redmi note 10s/Android 13, Samsung Galaxy m2/Android 12
Workaround:
Unknown
Platforms:
Which of our officially supported platforms is this issue occurring on?
Screenshots/Videos
Add any screenshot/video evidence
https://github.com/user-attachments/assets/f4d9936d-2285-4465-8c94-ba8263c5d5af
View all open jobs on GitHub
Upwork Automation - Do Not Edit
Issue Owner
Current Issue Owner: @hoangzinh