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 2024-10-16] [$250] Category rules - Approver field in category editor shows user email instead of user name #49277
Version Number: 9.0.35-0 Reproducible in staging?: Y Reproducible in production?: Y Email or phone of affected tester (no customers):applausetester+kh010901@applause.expensifail.com Issue reported by: Applause Internal Team
Action Performed:
Precondition:
Rules is enabled.
User has custom name.
Go to staging.new.expensify.com
Go to workspace settings > Workflows.
Click on the existing approval workflow under Add approvals.
Note that Approver field shows user name.
Go to workspace settings > Categories.
Click on any category.
Click Approver.
Select a user with custom name.
Expected Result:
Approver field in category editor will show user name.
Actual Result:
Approver field in category editor shows user email instead of user name.
@anmurali 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
What changes do you think we should make in order to solve the problem?
We should get the personal details of the approver based on the email then use getDisplayNameOrDefault function to get the display name of the approver
getDisplayNameOrDefault function will cover all cases of the user like remove SMS domain of phone number user, ....
What alternative solutions did you explore? (Optional)
We can create a new util like getCategoryApproverDisplayName and use getCategoryApprover function and the logic above to return the display name of the approver
@anmurali this issue was created 2 weeks ago. Are we close to a solution? Let's make sure we're treating this as a top priority. Don't hesitate to create a thread in #expensify-open-source to align faster in real time. Thanks!
Before proposing test steps for a bug, we first need to determine whether or not we should create a test for it. In order to determine this, we look for these common traits:
Is it easy to test for this bug? Yes
Is the bug related to an important user flow? I think No: it doesn’t affect the user flow as users can still select/update the approver
Is it an impactful bug? I think No: it only affects display names without breaking functionality
@anmurali Based on the best practices for Regression Test I think we can skip regression test for this issue
Activity
melvin-bot commentedon Sep 16, 2024
Triggered auto assignment to @anmurali (
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.IuliiaHerets commentedon Sep 16, 2024
@anmurali 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
nyomanjyotisa commentedon Sep 16, 2024
Proposal
Please re-state the problem that we are trying to solve in this issue.
Approver field in category editor shows user email instead of user name
What is the root cause of that problem?
App/src/libs/CategoryUtils.ts
Lines 47 to 49 in d860f2d
We display the approver field here which is the approver email
What changes do you think we should make in order to solve the problem?
Update
getCategoryApproverto get the approver display name using the email, and return the display nameWhat alternative solutions did you explore? (Optional)
cretadn22 commentedon Sep 16, 2024
Proposal
Please re-state the problem that we are trying to solve in this issue.
Approver field in category editor shows user email instead of user name
What is the root cause of that problem?
We show the approver field here which is email of approver
What changes do you think we should make in order to solve the problem?
We should avoid updating the getCategoryApprover function, as changes could impact other places
App/src/pages/workspace/categories/CategorySettingsPage.tsx
Lines 85 to 88 in d860f2d
We should retrieve the display name from PersonalDetails and show that instead of displaying the email address directly.
What alternative solutions did you explore? (Optional)
nkdengineer commentedon Sep 17, 2024
Proposal
Please re-state the problem that we are trying to solve in this issue.
Approver field in category editor shows user email instead of user name.
What is the root cause of that problem?
categoryApproverhere is the email of approverApp/src/pages/workspace/categories/CategorySettingsPage.tsx
Line 86 in 14b99ca
What changes do you think we should make in order to solve the problem?
We should get the personal details of the approver based on the email then use
getDisplayNameOrDefaultfunction to get the display name of the approverApp/src/pages/workspace/categories/CategorySettingsPage.tsx
Line 86 in 14b99ca
What alternative solutions did you explore? (Optional)
We can create a new util like
getCategoryApproverDisplayNameand usegetCategoryApproverfunction and the logic above to return the display name of the approvermelvin-bot commentedon Sep 19, 2024
@anmurali Uh oh! This issue is overdue by 2 days. Don't forget to update your issues!
melvin-bot commentedon Sep 23, 2024
@anmurali Still overdue 6 days?! Let's take care of this!
anmurali commentedon Sep 25, 2024
I am not sure where to go to turn on rules. I'll have to circle back to this one.
melvin-bot commentedon Sep 30, 2024
@anmurali this issue was created 2 weeks ago. Are we close to a solution? Let's make sure we're treating this as a top priority. Don't hesitate to create a thread in #expensify-open-source to align faster in real time. Thanks!
39 remaining items
melvin-bot commentedon Oct 23, 2024
@francoisl, @suneox, @anmurali, @cretadn22 6 days overdue. This is scarier than being forced to listen to Vogon poetry!
melvin-bot commentedon Oct 25, 2024
@francoisl, @suneox, @anmurali, @cretadn22 Now this issue is 8 days overdue. Are you sure this should be a Daily? Feel free to change it!
anmurali commentedon Oct 29, 2024
@suneox - it is checked off but I don’t see a regression test. Can you please add one?
anmurali commentedon Oct 29, 2024
Ah nm, you said we do not need one. @francoisl do you agree?
suneox commentedon Oct 31, 2024
Is it easy to test for this bug?
YesIs the bug related to an important user flow?
I think No: it doesn’t affect the user flow as users can still select/update the approverIs it an impactful bug?
I think No: it only affects display names without breaking functionality@anmurali Based on the best practices for Regression Test I think we can skip regression test for this issue
suneox commentedon Nov 3, 2024
Regression Test Proposal
Do we agree 👍 or 👎
cc: @anmurali
melvin-bot commentedon Nov 4, 2024
@francoisl, @suneox, @anmurali, @cretadn22 Huh... This is 4 days overdue. Who can take care of this?
francoisl commentedon Nov 5, 2024
I agree we can skip the regression test for this issue.
anmurali commentedon Nov 6, 2024
Paid.
melvin-bot commentedon Nov 6, 2024
@francoisl @anmurali Be sure to fill out the Contact List!