Closed IuliiaHerets closed 1 week ago
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.
We think that this bug might be related to #wave-control
@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
Edited by proposal-police: This proposal was edited at 2024-10-16 17:02:28 UTC.
Edit to the approval workflow is reset after upgrading the workspace from the additional approver flow.
When we go back from the upgrade page, we will call dismissModal
which will dismiss the whole RHP including the ongoing edit approval flow.
https://github.com/Expensify/App/blob/19b489c8e51a125980c598849a64becf51bc2e6e/src/pages/workspace/upgrade/WorkspaceUpgradePage.tsx#L98-L101
Then, we call goBack
which navigates to the backTo
params, in our case, the edit approval flow.
https://github.com/Expensify/App/blob/19b489c8e51a125980c598849a64becf51bc2e6e/src/pages/workspace/upgrade/WorkspaceUpgradePage.tsx#L39-L46
Because the page is closed and then reopened, the flow is restarted.
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();
}
Then, we can remove the dismissModal
from here.
https://github.com/Expensify/App/blob/19b489c8e51a125980c598849a64becf51bc2e6e/src/pages/workspace/upgrade/WorkspaceUpgradePage.tsx#L99-L111
The existing approver settings in Step 6 reverts to default after upgrading workspace plan.
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
We will not reset the approval workflow when the policy type changes.
const policyType = policy?.type;
const previousType = usePrevious(policy?.type);
if(policyType !== previousType){
Workflow.setApprovalWorkflow({
...currentApprovalWorkflow,
availableMembers: [...currentApprovalWorkflow.members, ...defaultWorkflowMembers],
usedApproverEmails,
action: CONST.APPROVAL_WORKFLOW.ACTION.EDIT,
isLoading: false,
errors: null,
});
}
Reproduced.
Job added to Upwork: https://www.upwork.com/jobs/~021847030936559806669
Triggered auto assignment to Contributor-plus team member for initial proposal review - @ishpaul777 (External
)
Pending @ishpaul777 review of proposals
Thanks for ping, i'll review in couple hours
Great. TY!
I swear i am on it today 🙇
Proposal from @bernhardoj works well and LGTM!
🎀 👀 🎀 C+ reviewed
Triggered auto assignment to @MarioExpensify, see https://stackoverflow.com/c/expensify/questions/7972 for more details.
Very well, proposal looks good @bernhardoj!! Thank you @ishpaul777, let's move forward.
📣 @ishpaul777 🎉 An offer has been automatically sent to your Upwork account for the Reviewer role 🎉 Thanks for contributing to the Expensify app!
PR is ready
cc: @ishpaul777
PR in review
Reviewing
label has been removed, please complete the "BugZero Checklist".
The solution for this issue has been :rocket: deployed to production :rocket: in version 9.0.56-9 and is now subject to a 7-day regression period :calendar:. Here is the list of pull requests that resolve this issue:
If no regressions arise, payment will be issued on 2024-11-11. :confetti_ball:
For reference, here are some details about the assignees on this issue:
@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]
Payment due next week! @ishpaul777 could you tackle checklist this week?
[x] [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
[x] [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
[x] [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.
Will handle payment today
Checklist is all set here. We need to pay:
@ishpaul777 $250 sent and contract ended
Upwork job closed.
Closing as all that's left here is for @bernhardoj to request payment via NewDot. Please do this at your earliest convenience!
Requested in ND.
$250 approved for @bernhardoj
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: 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:
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.
Workaround:
Unknown
Platforms:
Screenshots/Videos
https://github.com/user-attachments/assets/0ebb8d1c-91f2-428d-b2a0-4b1cbb47ed7a
View all open jobs on GitHub
Upwork Automation - Do Not Edit
Issue Owner
Current Issue Owner: @joekaufmanexpensify