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-11] [$250] Approver - Existing approver settings reverts to default after upgrading workspace plan #50924
Version Number: 9.0.49-1 Reproducible in staging?: Y Reproducible in production?: Y Email or phone of affected tester (no customers):applausetester+kh081006@applause.expensifail.com Issue reported by: Applause Internal Team
Action Performed:
Precondition:
Workspace is under Collect plan.
Workspace has at least two members.
Go to staging.new.expensify.com
Go to workspace settings > Workflows.
Enable Add approvals.
Click on the existing approval workflow.
Click Approver.
Select another member as approver and save it.
Click Additional approver.
Upgrade the plan.
Click Got it, thanks.
Expected Result:
The existing approver settings in Step 6 will be preserved.
Actual Result:
The existing approver settings in Step 6 reverts to default after upgrading workspace plan.
@joekaufmanexpensify 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
Because the page is closed and then reopened, the flow is restarted.
What changes do you think we should make in order to solve the problem?
Don't always call dismissModal. For the approval feature, just go back and navigate with the fallback route. For all other existing cases, keep the dismissModal to not change the other existing behavior.
switch (feature.id) {
case CONST.UPGRADE_FEATURE_INTRO_MAPPING.approvals.id:
Navigation.goBack();
if (route.params.backTo) {
Navigation.navigate(route.params.backTo);
}
return;
case CONST.UPGRADE_FEATURE_INTRO_MAPPING.reportFields.id:
case CONST.UPGRADE_FEATURE_INTRO_MAPPING.rules.id:
case CONST.UPGRADE_FEATURE_INTRO_MAPPING.companyCards.id:
Navigation.dismissModal();
return Navigation.navigate(ROUTES.WORKSPACE_MORE_FEATURES.getRoute(policyID));
default:
Navigation.dismissModal();
return route.params.backTo ? Navigation.navigate(route.params.backTo) : Navigation.goBack();
}
Please re-state the problem that we are trying to solve in this issue.
The existing approver settings in Step 6 reverts to default after upgrading workspace plan.
What is the root cause of that problem?
After calling the UpgradeToCorporate function, we have updated the policy type and the Workflow.setApprovalWorkflow function will be called in this useEffect => it has reverted to default approver
changed the title [-]Approver - Existing approver settings reverts to default after upgrading workspace plan[/-][+][$250] Approver - Existing approver settings reverts to default after upgrading workspace plan[/+]on Oct 17, 2024
@ishpaul777@joekaufmanexpensify The PR fixing this issue has been merged! The following checklist (instructions) will need to be completed before the issue can be closed. Please copy/paste the BugZero Checklist from here into a new comment on this GH and complete it. If you have the K2 extension, you can simply click: [this button]
[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. Not critical, minor issue
Link to discussion: No need
[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.- Not required one time issue now solved.
Activity
melvin-bot commentedon Oct 16, 2024
Triggered auto assignment to @joekaufmanexpensify (
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 Oct 16, 2024
We think that this bug might be related to #wave-control
IuliiaHerets commentedon Oct 16, 2024
@joekaufmanexpensify 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
bernhardoj commentedon Oct 16, 2024
Edited by proposal-police: This proposal was edited at 2024-10-16 17:02:28 UTC.
Proposal
Please re-state the problem that we are trying to solve in this issue.
Edit to the approval workflow is reset after upgrading the workspace from the additional approver flow.
What is the root cause of that problem?
When we go back from the upgrade page, we will call
dismissModalwhich will dismiss the whole RHP including the ongoing edit approval flow.App/src/pages/workspace/upgrade/WorkspaceUpgradePage.tsx
Lines 98 to 101 in 19b489c
Then, we call
goBackwhich navigates to thebackToparams, in our case, the edit approval flow.App/src/pages/workspace/upgrade/WorkspaceUpgradePage.tsx
Lines 39 to 46 in 19b489c
Because the page is closed and then reopened, the flow is restarted.
What changes do you think we should make in order to solve the problem?
Don't always call
dismissModal. For the approval feature, just go back and navigate with the fallback route. For all other existing cases, keep thedismissModalto not change the other existing behavior.Then, we can remove the
dismissModalfrom here.App/src/pages/workspace/upgrade/WorkspaceUpgradePage.tsx
Lines 99 to 111 in 19b489c
nkdengineer commentedon Oct 16, 2024
Proposal
Please re-state the problem that we are trying to solve in this issue.
The existing approver settings in Step 6 reverts to default after upgrading workspace plan.
What is the root cause of that problem?
After calling the
UpgradeToCorporatefunction, we have updated the policy type and theWorkflow.setApprovalWorkflowfunction will be called in this useEffect => it has reverted to default approverApp/src/pages/workspace/workflows/approvals/WorkspaceWorkflowsApprovalsEditPage.tsx
Lines 105 to 113 in fd2e0cb
What changes do you think we should make in order to solve the problem?
We will not reset the approval workflow when the policy type changes.
What alternative solutions did you explore? (Optional)
joekaufmanexpensify commentedon Oct 17, 2024
Reproduced.
[-]Approver - Existing approver settings reverts to default after upgrading workspace plan[/-][+][$250] Approver - Existing approver settings reverts to default after upgrading workspace plan[/+]melvin-bot commentedon Oct 17, 2024
Job added to Upwork: https://www.upwork.com/jobs/~021847030936559806669
29 remaining items
melvin-bot commentedon Nov 4, 2024
@ishpaul777 @joekaufmanexpensify The PR fixing this issue has been merged! The following checklist (instructions) will need to be completed before the issue can be closed. Please copy/paste the BugZero Checklist from here into a new comment on this GH and complete it. If you have the K2 extension, you can simply click: [this button]
joekaufmanexpensify commentedon Nov 4, 2024
Payment due next week! @ishpaul777 could you tackle checklist this week?
joekaufmanexpensify commentedon Nov 11, 2024
Bumped in slack
ishpaul777 commentedon Nov 11, 2024
BugZero Checklist:
Bug classification
Source of bug:
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: https://github.com/Expensify/App/pull/48673/files#r1836862383
[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. Not critical, minor issue
Link to discussion: No need
[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.- Not required one time issue now solved.
joekaufmanexpensify commentedon Nov 11, 2024
Will handle payment today
joekaufmanexpensify commentedon Nov 11, 2024
Checklist is all set here. We need to pay:
joekaufmanexpensify commentedon Nov 11, 2024
@ishpaul777 $250 sent and contract ended
joekaufmanexpensify commentedon Nov 11, 2024
Upwork job closed.
joekaufmanexpensify commentedon Nov 11, 2024
Closing as all that's left here is for @bernhardoj to request payment via NewDot. Please do this at your earliest convenience!
bernhardoj commentedon Nov 12, 2024
Requested in ND.
JmillsExpensify commentedon Nov 12, 2024
$250 approved for @bernhardoj