You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[HOLD for payment][$250] Mention-Numbers are displayed when editing an email mention of a user that is not a contact #45259
BugSomething is broken. Auto assigns a BugZero manager.DailyKSv2ExternalAdded to denote the issue can be worked on by a contributorHelp WantedApply this label when an issue is open to proposals by contributorsReviewingHas a PR in review
Please re-state the problem that we are trying to solve in this issue.
Mention-Numbers are displayed when editing an email mention of a user that is not a contact
What is the root cause of that problem?
The root cause of the problem is the Parser.htmlTomakdown function needs an accountIDToName map to convert the mentioned accountIDs to the respective name.
Edited by proposal-police: This proposal was edited at 2024-08-07 10:06:41 UTC.
Proposal
Please re-state the problem that we are trying to solve in this issue.
User ID number is displayed in the edit box instead of hidden
What is the root cause of that problem?
After we mention a user that we haven't chatted with before, BE returns the personal details of this user without login. And then accountIDToNameMap of this user is fallback to accountID
changed the title [-][$250] Mention-Numbers are displayed when editing an email mention of a user that is not a contact[/-][+][HOLD for payment][$250] Mention-Numbers are displayed when editing an email mention of a user that is not a contact[/+]on Sep 4, 2024
A discussion in #expensify-bugs has been started about whether any other steps should be taken (e.g. updating the PR review checklist) in order to catch this type of bug sooner. Link to discussion: N/A
Regression Test Proposal
Go to any chat
Send a message containing "@" mentioning an existing user without display name and not in your contacts list
BugSomething is broken. Auto assigns a BugZero manager.DailyKSv2ExternalAdded to denote the issue can be worked on by a contributorHelp WantedApply this label when an issue is open to proposals by contributorsReviewingHas a PR in review
Activity
melvin-bot commentedon Jul 11, 2024
Triggered auto assignment to @kadiealexander (
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.izarutskaya commentedon Jul 11, 2024
We think this issue might be related to the #vip-vsb
Tony-MK commentedon Jul 11, 2024
Proposal
Please re-state the problem that we are trying to solve in this issue.
Mention-Numbers are displayed when editing an email mention of a user that is not a contact
What is the root cause of that problem?
The root cause of the problem is the
Parser.htmlTomakdownfunction needs anaccountIDToNamemap to convert the mentioned accountIDs to the respective name.This issue occurs in the
Report.saveReportActionDraftfunction in theContextMenuActions.tsxfileApp/src/pages/home/report/ContextMenu/ContextMenuActions.tsx
Lines 243 to 245 in 28e5e45
Therefore, the
Parser.htmlTomakdownfunction returns the raw accountID because the HTML looks like the below example."<mention-user accountID="17038670"/>"It returns
@17038670instead of@Aliceand saves the draft as@17038670in the onyx.What changes do you think we should make in order to solve the problem?
We should pass an
accountIDToNameobject for the extras argument for theParser.htmlTomakdown."@Alice"We should create the
accountIDToNamerecord just before calling theReport.saveReportActionDraftfunction.So, the code that will create the
accountIDToNameobject should look similar to the one below.Screen.Recording.2024-07-11.at.18.47.51.mov
"@Hidden"Introduce
accountIDToNameby the following example code shown below.Hidden.mov
What alternative solutions did you explore? (Optional)
We could use or create a function to display "@alice" instead of "@hidden" like the second solution illustrated above for cleaner code in one line.
nkdengineer commentedon Jul 12, 2024
Edited by proposal-police: This proposal was edited at 2024-08-07 10:06:41 UTC.
Proposal
Please re-state the problem that we are trying to solve in this issue.
User ID number is displayed in the edit box instead of hidden
What is the root cause of that problem?
After we mention a user that we haven't chatted with before, BE returns the personal details of this user without
login. And thenaccountIDToNameMapof this user is fallback toaccountIDApp/src/libs/Parser.ts
Line 18 in 2c60fc9
What changes do you think we should make in order to solve the problem?
We should fallback as an empty string here then
htmlToMarkdownfunction can display the user asHiddenby default hereApp/src/libs/Parser.ts
Line 18 in 2c60fc9
What alternative solutions did you explore? (Optional)
Result
Screen.Recording.2024-08-07.at.17.05.04.mov
melvin-bot commentedon Jul 16, 2024
Unable to auto-create job on Upwork. The BZ team member should create it manually for this issue.
melvin-bot commentedon Jul 16, 2024
Triggered auto assignment to Contributor-plus team member for initial proposal review - @aimane-chnaif (
External)aimane-chnaif commentedon Jul 17, 2024
@puneetlath what do you think is the expected behavior?
As no way to get login (email), should show
@displayNameor@Hidden?puneetlath commentedon Jul 18, 2024
Hmm, weird scenario. Interesting. I think either is fine. I guess display name is better.
40 remaining items
melvin-bot commentedon Sep 4, 2024
Current assignee @aimane-chnaif is eligible for the External assigner, not assigning anyone new.
kadiealexander commentedon Sep 4, 2024
Payouts due:
Upwork job is here.
[-][$250] Mention-Numbers are displayed when editing an email mention of a user that is not a contact[/-][+][HOLD for payment][$250] Mention-Numbers are displayed when editing an email mention of a user that is not a contact[/+]kadiealexander commentedon Sep 9, 2024
@nkdengineer please let me know when you accept the offer.
@aimane-chnaif bump on completing the checklist!
aimane-chnaif commentedon Sep 10, 2024
Regression Test Proposal
nkdengineer commentedon Sep 10, 2024
@kadiealexander I accepted the offer
aimane-chnaif commentedon Sep 10, 2024
@kadiealexander I'd like to use upwork
kadiealexander commentedon Sep 12, 2024
@aimane-chnaif sent you an offer!
kadiealexander commentedon Sep 16, 2024
@aimane-chnaif bump!
kadiealexander commentedon Sep 18, 2024
@aimane-chnaif please reopen the issue once you've accepted the Upwork offer.
aimane-chnaif commentedon Sep 19, 2024
@kadiealexander I accepted offer. Sorry for delay
kadiealexander commentedon Sep 20, 2024
Paid, thanks @aimane-chnaif!