-
Notifications
You must be signed in to change notification settings - Fork 3.1k
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
[HOLD for payment 2024-04-05] [$250] Web - Inconsistent behavior when saving existing name without edit #38668
Comments
👋 Friendly reminder that deploy blockers are time-sensitive ⏱ issues! Check out the open `StagingDeployCash` deploy checklist to see the list of PRs included in this release, then work quickly to do one of the following:
|
Triggered auto assignment to @cristipaval ( |
This is not a blocker, its a new feature, I can take over. |
ProposalPlease re-state the problem that we are trying to solve in this issue.Categories & Tags - Inconsistent behavior when saving existing name without edit What is the root cause of that problem?We have duplicate tag check but it is wrong: App/src/pages/workspace/tags/EditTagPage.tsx Lines 41 to 50 in 0fa4d0f
What changes do you think we should make in order to solve the problem?Update duplicate App/src/pages/workspace/categories/CategoryForm.tsx Lines 42 to 43 in 0fa4d0f
This check should be updated to: } else if (policyCategories?.[newCategoryName] && currentCategoryName !== newCategoryName) {
errors.categoryName = 'workspace.categories.existingCategoryError'; Now we also shouldn't make a App/src/pages/workspace/tags/EditTagPage.tsx Lines 57 to 64 in 0fa4d0f
TO: const editTag = useCallback(
(values: FormOnyxValues<typeof ONYXKEYS.FORMS.WORKSPACE_TAG_FORM>) => {
if(!(policyCategories?.[newCategoryName] && currentCategoryName !== newCategoryName)){
Policy.renamePolicyTag(route.params.policyID, {oldName: currentTagName, newName: values.tagName.trim()});
}
Keyboard.dismiss();
Navigation.dismissModal();
},
[route.params.policyID, currentTagName],
); Similar would be done on category page. What alternative solutions did you explore? (Optional)N/A |
I think we should update duplicate category check from the edit category page , what about you @mountiny ? |
Thanks @mountiny ! 🙏 |
Job added to Upwork: https://www.upwork.com/jobs/~017d373a5e049d77c6 |
Triggered auto assignment to Contributor-plus team member for initial proposal review - @ntdiary ( |
|
Upwork job price has been updated to $500 |
ProposalPlease re-state the problem that we are trying to solve in this issue.Web - Inconsistent behavior when saving existing name without edit What is the root cause of that problem?We don't check if the value is changed or not before validating here:
What changes do you think we should make in order to solve the problem?Update the line to use the Result |
Updated proposalUpdated my proposal to also not call the api if we make no edits |
PR ready for review c.c. @shubham1206agra |
|
The solution for this issue has been 🚀 deployed to production 🚀 in version 1.4.57-5 and is now subject to a 7-day regression period 📆. Here is the list of pull requests that resolve this issue:
If no regressions arise, payment will be issued on 2024-04-05. 🎊 For reference, here are some details about the assignees on this issue:
|
@mountiny Please assign me here as C+ |
📣 @shubham1206agra 🎉 An offer has been automatically sent to your Upwork account for the Contributor role 🎉 Thanks for contributing to the Expensify app! Offer link |
$250 to @GandalfGwaihir and $250 to @shubham1206agra |
Triggered auto assignment to @slafortune ( |
@shubham1206agra please accept this offer - https://www.upwork.com/nx/wm/offer/101650388 |
@shubham1206agra please accept this offer - https://www.upwork.com/nx/wm/offer/101650388 |
I'll be out of the office until 4/22 and will check on this then. |
@slafortune Accepted the offer. |
Bump to @slafortune to close this one once @shubham1206agra gets paid :) |
Yep, just back today! Paid and closing ✔️ |
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: 1.4.55-0
Reproducible in staging?: y
Reproducible in production?: new feature
Issue reported by: Applause - Internal Team
Action Performed:
Precondition:
Expected Result:
When saving category and tag name without editing, the behavior should be consistent. If error is meant to show up, it should show up for both. Otherwise, there should be no error for both.
For any feature - Category, tag, distance or tax, when the name is being changed but no change has been done, do nothing and just close the modal (skip the API call too)
Actual Result:
In Step 6, error shows up when saving category name without editing it.
In Step 11, no error shows up when saving tag name without editing it.
Workaround:
n/a
Platforms:
Which of our officially supported platforms is this issue occurring on?
Screenshots/Videos
Add any screenshot/video evidence
Bug6420400_1710936083255.20240320_194746.1.mp4
View all open jobs on GitHub
Upwork Automation - Do Not Edit
Issue Owner
Current Issue Owner: @shubham1206agraThe text was updated successfully, but these errors were encountered: