-
Notifications
You must be signed in to change notification settings - Fork 3k
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
[$250] Workflow - RHP for Add approval workflow doesn't appear after upgrading the workspace #56653
Comments
Triggered auto assignment to @johncschuster ( |
🚨 Edited by proposal-police: This proposal was edited at 2025-02-11 11:45:01 UTC. ProposalPlease re-state the problem that we are trying to solve in this issue.Workflow - RHP for Add approval workflow doesn't appear after upgrading the workspace What is the root cause of that problem?The root cause is that the redirection route provided when launching the upgrade modal is incorrect. Currently, the navigation call in the App/src/pages/workspace/workflows/WorkspaceWorkflowsPage.tsx Lines 108 to 111 in 48520ec
What changes do you think we should make in order to solve the problem?We should update the third parameter of the route so that the upgrade modal redirects to the correct page. In Navigation.navigate(
ROUTES.WORKSPACE_UPGRADE.getRoute(
route.params.policyID,
CONST.UPGRADE_FEATURE_INTRO_MAPPING.approvals.alias,
ROUTES.WORKSPACE_WORKFLOWS_APPROVALS_EXPENSES_FROM.getRoute(route.params.policyID)
),
); What specific scenarios should we cover in automated tests to prevent reintroducing this issue in the future?create ui test, signin as test user, create fake collect workspace, render workflows setting page of that workspace, fireEvent.press "Add approval workflow", fireEvent.press "Upgrade" button, fireEvent.press "Got it, thanks" button, verify Add aproval workflow displayed What alternative solutions did you explore? (Optional)N/A |
Job added to Upwork: https://www.upwork.com/jobs/~021890550282210470430 |
Triggered auto assignment to Contributor-plus team member for initial proposal review - @brunovjk ( |
ProposalPlease re-state the problem that we are trying to solve in this issue.RHP for Add approval workflow doesn't appear immediately. What is the root cause of that problem?App/src/pages/workspace/workflows/WorkspaceWorkflowsPage.tsx Lines 107 to 109 in 48520ec
The third param (backTo) of the navigate function is wrong What changes do you think we should make in order to solve the problem?Should update to After making the above update, we have another problem. Before navigating to WORKSPACE_WORKFLOWS_APPROVALS_EXPENSES_FROM we need to set the initial workflow as we did
To address this additional problem, I suggest two solutions:
What specific scenarios should we cover in automated tests to prevent reintroducing this issue in the future?NA What alternative solutions did you explore? (Optional)Reminder: Please use plain English, be brief and avoid jargon. Feel free to use images, charts or pseudo-code if necessary. Do not post large multi-line diffs or write walls of text. Do not create PRs unless you have been hired for this job. |
🚨 Edited by proposal-police: This proposal was edited at 2025-02-15 16:11:19 UTC. ProposalPlease re-state the problem that we are trying to solve in this issue.RHP for Add approval workflow doesn't appear after upgrading the workspace What is the root cause of that problem?After the upgrade workflow is complete, the thank you page should be shown. App/src/pages/workspace/upgrade/WorkspaceUpgradePage.tsx Lines 187 to 192 in 1f8e5bd
On the thank you page, clicking 'Got it' will navigate back to Workflows App/src/pages/workspace/upgrade/WorkspaceUpgradePage.tsx Lines 65 to 68 in 1f8e5bd
So, we don't navigate to 'Add Approval Workflow' after a successful upgrade What changes do you think we should make in order to solve the problem?To resolve this issue, we should call the 'Add Approval Workflow' function after clicking 'Got it' of 'thank you' page. const {availableMembers, usedApproverEmails} = useMemo(
() =>
convertPolicyEmployeesToApprovalWorkflows({
employees: policy?.employeeList ?? {},
defaultApprover: policyApproverEmail ?? policy?.owner ?? '',
personalDetails: personalDetails ?? {},
}),
[personalDetails, policy?.employeeList, policy?.owner, policyApproverEmail],
); App/src/pages/workspace/upgrade/WorkspaceUpgradePage.tsx Lines 65 to 68 in 1f8e5bd
Update to: case CONST.UPGRADE_FEATURE_INTRO_MAPPING.approvals.id:
Workflow.setApprovalWorkflow({
...INITIAL_APPROVAL_WORKFLOW,
availableMembers,
usedApproverEmails,
});
Navigation.goBack();
Navigation.navigate(ROUTES.WORKSPACE_WORKFLOWS_APPROVALS_EXPENSES_FROM.getRoute(route.params.policyID));
return; Test branchScreen.Recording.2025-02-15.at.22.59.56.mp4What specific scenarios should we cover in automated tests to prevent reintroducing this issue in the future?None What alternative solutions did you explore? (Optional)Reminder: Please use plain English, be brief and avoid jargon. Feel free to use images, charts or pseudo-code if necessary. Do not post large multi-line diffs or write walls of text. Do not create PRs unless you have been hired for this job. After successfully upgrading, we should automatically navigate to 'Add Approval Workflow' 1 Create new useEffect and add: useEffect(() => {
if (!policy || !isUpgraded || feature?.id !== CONST.UPGRADE_FEATURE_INTRO_MAPPING.approvals.id) {
return;
}
Workflow.setApprovalWorkflow({
...INITIAL_APPROVAL_WORKFLOW,
availableMembers,
usedApproverEmails,
});
Navigation.goBack();
Navigation.navigate(ROUTES.WORKSPACE_WORKFLOWS_APPROVALS_EXPENSES_FROM.getRoute(route.params.policyID ?? ''));
}, [availableMembers, feature?.id, isUpgraded, policy, route.params.policyID, usedApproverEmails]);
Screen.Recording.2025-02-15.at.23.00.35.mp4Alternative solutions 2Call navigation to 'Add Approval Workflow' after a successful upgrade.
InteractionManager.runAfterInteractions(() => {
requestAnimationFrame(() => {
if (!policy || !isUpgraded || feature?.id !== CONST.UPGRADE_FEATURE_INTRO_MAPPING.approvals.id) {
return;
}
Workflow.setApprovalWorkflow({
...INITIAL_APPROVAL_WORKFLOW,
availableMembers,
usedApproverEmails,
});
Navigation.goBack();
Navigation.navigate(ROUTES.WORKSPACE_WORKFLOWS_APPROVALS_EXPENSES_FROM.getRoute(route.params.policyID ?? ''));
});
}); |
This comment has been minimized.
This comment has been minimized.
Thank you all for your proposals. @nyomanjyotisa correctly identified the root cause: the incorrect I recommend proceeding with @thelullabyy proposal. 🎀👀🎀 C+ reviewed |
Triggered auto assignment to @stitesExpensify, see https://stackoverflow.com/c/expensify/questions/7972 for more details. |
📣 @brunovjk 🎉 An offer has been automatically sent to your Upwork account for the Reviewer role 🎉 Thanks for contributing to the Expensify app! |
📣 @thelullabyy 🎉 An offer has been automatically sent to your Upwork account for the Contributor role 🎉 Thanks for contributing to the Expensify app! Offer link |
@thelullabyy would you have an ETA for us? Thank you. |
The PR will be ready today |
If you haven’t already, check out our contributing guidelines for onboarding and email [email protected] to request to join our Slack channel!
Version Number: 9.0.96-0
Reproducible in staging?: Yes
Reproducible in production?: Yes
If this was caught during regression testing, add the test name, ID and link from TestRail: Exp
Email or phone of affected tester (no customers): [email protected]
Issue reported by: Applause Internal Team
Device used: Windows Windows 11 - Chrome, Samsung Galaxy A13 - Android 14, Wi-Fi, Chrome
App Component: Workspace Settings
Action Performed:
Expected Result:
RHP for Add approval workflow should appear immediately after upgrading to unlock the feature.
Actual Result:
RHP for Add approval workflow doesn't appear immediately.
Workaround:
Unknown
Platforms:
Screenshots/Videos
Bug6739287_1739260716457.bandicam_2025-02-11_10-50-58-255.mp4
View all open jobs on GitHub
Upwork Automation - Do Not Edit
Issue Owner
Current Issue Owner: @brunovjkThe text was updated successfully, but these errors were encountered: