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-11-29] [$375] Card - Android - when user goes back to amount step in the flow the cursor is at the beginning instead of the end of the amount #52029
Should the value be cleared when we select another assignee? It was not something that was required in the docs.
I think the form should be cleared only when we exit the flow or we submit the form to issue the card.
And I don't think it's something we would like to change - let's say we went to confirmation step - all the data is ok, but we want to change the assignee only - when we confirm that and we're redirected back to confirmation page the value would be empty. (I wonder if the error would appear, not sure about that).
The only value we want to change in this case is the default card name (for physical card) to be updated to the newly selected user's name i.e. User's Card to NewUser's Card. It has been already implemented.
We can't pass limit: undefined because Onyx will not apply the undefined value to the limit property
And for null value the type of limit is number or undefined because it's optional, so when pass null value it will throw an error unless we add the null type to the limit property
constsubmit=(assignee: ListItem)=>{constdata: Partial<IssueNewCardData>=issueNewCard?.data.assigneeEmail===assignee.login ? {assigneeEmail: assignee?.login??'',} : {assigneeEmail: assignee?.login??'',limit: 0};if(isEditing&&issueNewCard?.data?.cardTitle===Card.getCardDefaultName(PersonalDetailsUtils.getUserNameByEmail(issueNewCard?.data?.assigneeEmail,'firstName'))){// If the card title is the default card title, update it with the new assignee's namedata.cardTitle=Card.getCardDefaultName(PersonalDetailsUtils.getUserNameByEmail(assignee?.login??'','firstName'));}Card.setIssueNewCardStepAndData({step: isEditing ? CONST.EXPENSIFY_CARD.STEP.CONFIRMATION : CONST.EXPENSIFY_CARD.STEP.CARD_TYPE,
data,isEditing: false,});};
And inside the limit input we should fallback the default value to undefined if the limit value is 0 so it start with empty value
changed the title [-]Card - Android - "Set a limit" amount selected for previous user is displayed[/-][+][Workspace Feeds] Card - Android - "Set a limit" amount selected for previous user is displayed[/+]on Nov 6, 2024
Good questions, I feel like we do not want to reset it, think that you want to go over the step back and to select different value in the previous step and then you continue to the amount again - I would want to keep the amount I already inserted.
@shawnborton do you agree with that expected results, hence close this issue?
Yeah, I agree with your analysis Vit - I don't think we need to reset the limit in this stepped flow personally, I think it makes sense to keep it here. cc @Expensify/design just for visibility but I think they might agree?
1a. Result of the original design (eg. a case wasn't considered)
1b. Mistake during implementation
1c. Backend bug
1z. Other: react-native external package issue.
Where bug was reported:
2a. Reported on production
2b. Reported on staging (deploy blocker)
2c. Reported on both staging and production
2d. Reported on a PR
2z. Other:
Who reported the bug:
3a. Expensify user
3b. Expensify employee
3c. Contributor
3d. QA
3z. Other:
[Contributor] The offending PR has been commented on, pointing out the bug it caused and why, so the author and reviewers can learn from the mistake.
Link to comment: N/A as this was a react-native external package issue.
[Contributor] If the regression was CRITICAL (e.g. interrupts a core flow) A discussion in #expensify-open-source 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 as this was a react-native external package issue.
[Contributor] If it was decided to create a regression test for the bug, please propose the regression test steps using the template below to ensure the same bug will not reach production again.
[BugZero Assignee] Create a GH issue for creating/updating the regression test once above steps have been agreed upon.
Link to issue:
Regression Test Proposal
Launch Android: Native app.
Login with account with expensify card enabled with bank account added, and few members invited in workspace.
Go to workspace settings.
Tap expensify card.
Tap issue card.
Select a user -> physical card -> monthly.
Input an amount in the Set a limit amount page.
Go to confirmation page.
Navigate back to the Set a limit amount page.
Verify that the cursor caret is at the end of amount, not at the begginning right after the currency symbol.
Activity
melvin-bot commentedon Nov 5, 2024
Triggered auto assignment to @muttmuure (
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.koko57 commentedon Nov 5, 2024
Should the value be cleared when we select another assignee? It was not something that was required in the docs.
I think the form should be cleared only when we exit the flow or we submit the form to issue the card.
And I don't think it's something we would like to change - let's say we went to confirmation step - all the data is ok, but we want to change the assignee only - when we confirm that and we're redirected back to confirmation page the value would be empty. (I wonder if the error would appear, not sure about that).
The only value we want to change in this case is the default card name (for physical card) to be updated to the newly selected user's name i.e. User's Card to NewUser's Card. It has been already implemented.
cc @mountiny
NJ-2020 commentedon Nov 5, 2024
Proposal
Please re-state the problem that we are trying to solve in this issue.
Card - Android - "Set a limit" amount selected for previous user is displayed
What is the root cause of that problem?
We're not clearing the the limit when selecting assignee
App/src/pages/workspace/expensifyCard/issueNew/AssigneeStep.tsx
Lines 43 to 56 in b1bffa6
What changes do you think we should make in order to solve the problem?
We need to reset the limit value by adding
limit: 0to this variable if the previous assignee and the current assignee email login is not sameApp/src/pages/workspace/expensifyCard/issueNew/AssigneeStep.tsx
Lines 43 to 45 in b1bffa6
We can't pass
limit: undefinedbecause Onyx will not apply the undefined value to the limit propertyAnd for
nullvalue the type of limit is number or undefined because it's optional, so when pass null value it will throw an error unless we add the null type to the limit propertyAnd inside the limit input we should fallback the default value to undefined if the limit value is 0 so it start with empty value
App/src/pages/workspace/expensifyCard/issueNew/LimitStep.tsx
Line 90 in b1bffa6
What alternative solutions did you explore? (Optional)
[-]Card - Android - "Set a limit" amount selected for previous user is displayed[/-][+][Workspace Feeds] Card - Android - "Set a limit" amount selected for previous user is displayed[/+]melvin-bot commentedon Nov 6, 2024
Triggered auto assignment to @shawnborton (
Design), see these Stack Overflow questions for more details.mountiny commentedon Nov 6, 2024
Good questions, I feel like we do not want to reset it, think that you want to go over the step back and to select different value in the previous step and then you continue to the amount again - I would want to keep the amount I already inserted.
@shawnborton do you agree with that expected results, hence close this issue?
shawnborton commentedon Nov 6, 2024
Yeah, I agree with your analysis Vit - I don't think we need to reset the limit in this stepped flow personally, I think it makes sense to keep it here. cc @Expensify/design just for visibility but I think they might agree?
50 remaining items
ikevin127 commentedon Nov 29, 2024
cc @muttmuure for visibility
ikevin127 commentedon Nov 29, 2024
BugZero Checklist:
Bug classification
Source of bug:
react-nativeexternal package issue.Where bug was reported:
Who reported the bug:
[Contributor] The offending PR has been commented on, pointing out the bug it caused and why, so the author and reviewers can learn from the mistake.
Link to comment: N/A as this was a
react-nativeexternal package issue.[Contributor] If the regression was CRITICAL (e.g. interrupts a core flow) A discussion in #expensify-open-source 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 as this was a
react-nativeexternal package issue.[Contributor] If it was decided to create a regression test for the bug, please propose the regression test steps using the template below to ensure the same bug will not reach production again.
[BugZero Assignee] Create a GH issue for creating/updating the regression test once above steps have been agreed upon.
Link to issue:
Regression Test Proposal
Do we agree 👍 or 👎.
melvin-bot commentedon Dec 2, 2024
@shawnborton, @mananjadhav, @mountiny, @muttmuure, @ikevin127 Uh oh! This issue is overdue by 2 days. Don't forget to update your issues!
muttmuure commentedon Dec 2, 2024
@ikevin127 - $375 C (Paid)
@mananjadhav - $375 C+
mananjadhav commentedon Dec 2, 2024
@muttmuure I am going to hold raising a request on NewDot as all my payouts for November have some issue.Raised my request on NewDot.
ikevin127 commentedon Dec 4, 2024
Not overdue, this can be set to
Weeklyuntil the remaining payment is handled.garrettmknight commentedon Dec 10, 2024
$375 approved for @mananjadhav