-
Notifications
You must be signed in to change notification settings - Fork 3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[$250] Company cards-The card name is reset even if the cardholder has not been changed #56206
Comments
Triggered auto assignment to @greg-schroeder ( |
ProposalPlease re-state the problem that we are trying to solve in this issue.The card name is reset even if the cardholder has not been changed What is the root cause of that problem?We set a new card name everytime a member is selected, regardless of the logic that the same member might have been selected: App/src/pages/workspace/companyCards/assignCard/AssigneeStep.tsx Lines 70 to 73 in 9689e56
This causes the What changes do you think we should make in order to solve the problem?We need to add a condition such that if the selected member is same as const data: Partial<AssignCardData> =
selectedMember === assignCard?.data?.email
? assignCard.data
: {
email: selectedMember,
cardName: CardUtils.getDefaultCardName(memberName),
}; Or we can simply update the
What specific scenarios should we cover in automated tests to prevent reintroducing this issue in the future?N/A this is a data assignment bug with the way we handle the logic to update the values for same member selection What alternative solutions did you explore? (Optional) |
Job added to Upwork: https://www.upwork.com/jobs/~021886883012132760890 |
Triggered auto assignment to Contributor-plus team member for initial proposal review - @hungvu193 ( |
Sending to |
@twilight2294 How do you enable the expensify card feeed? |
ProposalPlease re-state the problem that we are trying to solve in this issue.The card name is reset even if the cardholder has not been changed What is the root cause of that problem?When choosing a new assignee, we reset the cardholder to its default value
What changes do you think we should make in order to solve the problem?Need to implement an early return on the submit button if the selected member hasn't been changed
What specific scenarios should we cover in automated tests to prevent reintroducing this issue in the future?It's not needed as I think What alternative solutions did you explore? (Optional) |
@hungvu193 I don't have access to this feature, but we can reproduce the bug by modifying the local code and manually adding some data to storage |
Asking for help with adding a commercial card on Slack. I'll be circling back here soon. |
@hungvu193 Could you help to add a commercial card to my account too? |
I'm not sure if external contributors are allowed to add company card, but let me ask internally. |
I mocked data for this @hungvu193 |
Thanks for the proposals, everyone. I also prefer adding an early return if we select the same person to avoid unnecessary renders. @cretadn22 's proposal here looks good to me! |
Triggered auto assignment to @MonilBhavsar, see https://stackoverflow.com/c/expensify/questions/7972 for more details. |
@hungvu193 I found a problem here, Saying cause i tested it now and current implementation and suggested proposals would lead to bugs in the future, so would it be okay if we do so and update the key to collection unique for each workspace ? I would love to work on it and update the proposal as well c.c. @MonilBhavsar as well |
@twilight2294 Could you clarify which bug might occur with my solution? |
I don't think I can reproduce it, and it doesn't seem to be related to this issue 🤔 |
Not specific to yours but both of our solutions. The same data will persist for different workspaces.
We would be able to reproduce this one if we have company feeds added to 2 workspaces, same reproduction steps as the ones here #55125, just for company cards, just found it out while experimenting the solutions |
@twilight2294 Your explanation is a bit unclear. Could you provide a video to clarify your concern? I don't believe it's related to this issue. |
If you haven’t already, check out our contributing guidelines for onboarding and email [email protected] to request to join our Slack channel!
Version Number: 9.0.93-3
Reproducible in staging?: Yes
Reproducible in production?: Yes
If this was caught during regression testing, add the test name, ID and link from TestRail: https://expensify.testrail.io/index.php?/tests/view/5543601
Email or phone of affected tester (no customers): [email protected]
Issue reported by: Applause Internal Team
Device used: Windows 10/ Chrome, Samsung S23FE/ Android 14
App Component: Workspace Settings
Action Performed:
Navigate to the workspace "Company Cards tests - DO NOT DELETE!"
Expected Result:
The card name remains the same when the same cardholder has been selected or the selection has not been changed.
Actual Result:
The card name is reset even if the cardholder has not been changed.
Workaround:
Unknown
Platforms:
Screenshots/Videos
Bug6729972_1738360996916.Card_name_is_reset.mp4
View all open jobs on GitHub
Upwork Automation - Do Not Edit
Issue Owner
Current Issue Owner: @hungvu193The text was updated successfully, but these errors were encountered: