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-10] [$250] Category rules - Approver field is blank for a moment after editing category name #49293
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 and Workflows are enabled.
Go to staging.new.expensify.com
Go to workspace settings > Categories.
Click on any category.
Click Approver.
Select any user.
Click Name.
Edit the name.
Expected Result:
Approver field will not go blank after editing category name.
Actual Result:
Approver field is blank for a moment after editing category name.
Workaround:
Unknown
Platforms:
Which of our officially supported platforms is this issue occurring on?
@stephanieelliott 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
BTW similar problem exists for default tax rate which depends on policy?.rules?.expenseRuleshere so similar fix can be done for it too.
What alternative solutions did you explore? (Optional)
The other option we have is update policy?.rules?.approvalRules optimistically in Category.renamePolicyCategory on category name change. We can iterate on the approvalRules and when we find applyWhen with value prop same as the oldname of the category we change that value with the new category name (we will also optimistically update policy?.rules?.expenseRules for the problem regarding default tax rate)
changed the title [-]Category rules - Approver field is blank for a moment after editing category name[/-][+][$250] Category rules - Approver field is blank for a moment after editing category name[/+]on Sep 20, 2024
BugZero Checklist: The PR fixing this issue has been merged! The following checklist (instructions) will need to be completed before the issue can be closed:
[@thesahindia] The PR that introduced the bug has been identified. Link to the PR:
[@thesahindia] 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:
[@thesahindia] 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:
[@thesahindia] Determine if we should create a regression test for this bug.
[@thesahindia] If we decide to create a regression test for the bug, please propose the regression test steps to ensure the same bug will not reach production again.
[@stephanieelliott] Link the GH issue for creating/updating the regression test once above steps have been agreed upon:
Activity
melvin-bot commentedon Sep 16, 2024
Triggered auto assignment to @stephanieelliott (
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
@stephanieelliott 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
FitseTLT commentedon Sep 16, 2024
Edited by proposal-police: This proposal was edited at 2024-09-16 19:47:51 UTC.
Proposal
Please re-state the problem that we are trying to solve in this issue.
Category rules - Approver field is blank for a moment after editing category name
What is the root cause of that problem?
We use category name to get the approver here
App/src/pages/workspace/categories/CategorySettingsPage.tsx
Line 86 in 00bc167
but the policy rule takes time to get updated with the new category name
What changes do you think we should make in order to solve the problem?
We can use previous category name to get a fallback in case the approver with current category name doesn't exist
We also have an option to use
previousCategoryNamepolicyCategories to achieve the same similar to what we did hereBTW similar problem exists for default tax rate which depends on
policy?.rules?.expenseRuleshere so similar fix can be done for it too.What alternative solutions did you explore? (Optional)
The other option we have is update
policy?.rules?.approvalRulesoptimistically in Category.renamePolicyCategory on category name change. We can iterate on theapprovalRulesand when we findapplyWhenwith value prop same as the oldname of the category we change thatvaluewith the new category name (we will also optimistically updatepolicy?.rules?.expenseRulesfor the problem regarding default tax rate)FitseTLT commentedon Sep 16, 2024
Updated
[-]Category rules - Approver field is blank for a moment after editing category name[/-][+][$250] Category rules - Approver field is blank for a moment after editing category name[/+]melvin-bot commentedon Sep 20, 2024
Job added to Upwork: https://www.upwork.com/jobs/~021837011004719364383
melvin-bot commentedon Sep 20, 2024
Triggered auto assignment to Contributor-plus team member for initial proposal review - @thesahindia (
External)24 remaining items
melvin-bot commentedon Oct 3, 2024
BugZero Checklist: The PR fixing this issue has been merged! The following checklist (instructions) will need to be completed before the issue can be closed:
stephanieelliott commentedon Oct 11, 2024
Hey @thesahindia can you complete the BugZero checklist please?
stephanieelliott commentedon Oct 11, 2024
Summarizing payment on this issue:
Upwork job is here: https://www.upwork.com/jobs/~021837011004719364383
melvin-bot commentedon Oct 14, 2024
@stephanieelliott, @FitseTLT, @stitesExpensify, @thesahindia Uh oh! This issue is overdue by 2 days. Don't forget to update your issues!
stephanieelliott commentedon Oct 14, 2024
^^ bump @thesahindia
thesahindia commentedon Oct 15, 2024
Seems like it was an issue in the implementation.
Here are the steps for the test case:
Precondition: Taxes, Rules and Workflows are enabled.
stephanieelliott commentedon Oct 16, 2024
Thanks! Test rail case here: https://github.com/Expensify/Expensify/issues/436519
garrettmknight commentedon Nov 26, 2024
$250 paid for @thesahindia