Skip to content
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] Workflows - Back button on workspace editor reopens Workflows after adding workflow #47458

Closed
4 of 6 tasks
izarutskaya opened this issue Aug 14, 2024 · 24 comments
Closed
4 of 6 tasks
Assignees
Labels
Bug Something is broken. Auto assigns a BugZero manager. Engineering External Added to denote the issue can be worked on by a contributor Help Wanted Apply this label when an issue is open to proposals by contributors Weekly KSv2

Comments

@izarutskaya
Copy link

izarutskaya commented Aug 14, 2024

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: v9.0.20-0
Reproducible in staging?: Y
Reproducible in production?: N
Email or phone of affected tester (no customers): applausetester+kh050806@applause.expensifail.com
Logs: https://stackoverflow.com/c/expensify/questions/4856
Issue reported by: Applause-internal team

Action Performed:

Precondition:

  • Workspace is under Control plan.
  • Workspace has a few members.
  1. Launch New Expensify app.
  2. Go to workspace settings > Workflows.
  3. Tap Add approval workflow.
  4. Go through the setup and tap Add workflow on the confirmation page.
  5. On Workflows page, tap on app back button.
  6. On workspace editor page, tap on app back button.

Expected Result:

App will return to workspace list.

Actual Result:

App reopens Workflows page when tapping on back button on workspace editor page after adding workflow.

Workaround:

Unknown

Platforms:

Which of our officially supported platforms is this issue occurring on?

  • Android: Native
  • Android: mWeb Chrome
  • iOS: Native
  • iOS: mWeb Safari
  • MacOS: Chrome / Safari
  • MacOS: Desktop

Screenshots/Videos

Bug6572333_1723664222742.w_57b3cc356d3fcdff84e08e75aed1e34f10be7b0b-2024-08-14_19_31_55.679.mp4

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~0122ee0f611f968eaa
  • Upwork Job ID: 1824121720115141860
  • Last Price Increase: 2024-08-22
Issue OwnerCurrent Issue Owner: @shubham1206agra
@izarutskaya izarutskaya added DeployBlockerCash This issue or pull request should block deployment Daily KSv2 Bug Something is broken. Auto assigns a BugZero manager. labels Aug 14, 2024
Copy link

melvin-bot bot commented Aug 14, 2024

Triggered auto assignment to @isabelastisser (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.

Copy link

melvin-bot bot commented Aug 14, 2024

Triggered auto assignment to @blimpich (DeployBlockerCash), see https://stackoverflowteams.com/c/expensify/questions/9980/ for more details.

@github-actions github-actions bot added Engineering Hourly KSv2 and removed Daily KSv2 labels Aug 14, 2024
Copy link
Contributor

👋 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:

  1. Identify the pull request that introduced this issue and revert it.
  2. Find someone who can quickly fix the issue.
  3. Fix the issue yourself.

@izarutskaya
Copy link
Author

We think this issue might be related to the #wave-control

@izarutskaya
Copy link
Author

Production

Screen_Recording_20240814_225656_Chrome.mp4

@tgolen
Copy link
Contributor

tgolen commented Aug 14, 2024

This feature is behind a beta so I am removing the feature flag cc @blazejkustra @DylanDylann

@tgolen tgolen added Daily KSv2 and removed Hourly KSv2 DeployBlockerCash This issue or pull request should block deployment labels Aug 14, 2024
@bernhardoj
Copy link
Contributor

Proposal

Please re-state the problem that we are trying to solve in this issue.

After submitting a new approval workflow, pressing back from the workspace reopens the workflow page again.

What is the root cause of that problem?

When we are creating a new approval workflow, we go from selecting members step -> selecting approver step. At this point, the rhp nav stack is: [select member, select approver]. When we go next again, both screens are removed and replaced with the confirmation page.

if (approvalWorkflow?.action === CONST.APPROVAL_WORKFLOW.ACTION.CREATE) {
Navigation.goBack();
Navigation.navigate(ROUTES.WORKSPACE_WORKFLOWS_APPROVALS_NEW.getRoute(route.params.policyID), CONST.NAVIGATION.TYPE.UP);

So, the confirm page will be the only one in the RHP stack. When we submit the confirmation, the app will call goBack with a fallback to the workflow page.

Workflow.createApprovalWorkflow(route.params.policyID, approvalWorkflow);
Navigation.goBack(ROUTES.WORKSPACE_WORKFLOWS.getRoute(route.params.policyID));

Because the confirm page is the only screen in the RHP, the confirm page will be replaced with the fallback route, so there is a duplicate workflow page in the nav stack.

This happens too if we refresh the page while on the confirm page.

What changes do you think we should make in order to solve the problem?

We should remove the fallback route, so till be just goBack().

It's the same as we did when editing the approval.

Workflow.updateApprovalWorkflow(route.params.policyID, approvalWorkflow, membersToRemove);
Navigation.goBack();

@blimpich blimpich added the External Added to denote the issue can be worked on by a contributor label Aug 15, 2024
Copy link

melvin-bot bot commented Aug 15, 2024

Job added to Upwork: https://www.upwork.com/jobs/~0122ee0f611f968eaa

@melvin-bot melvin-bot bot changed the title Workflows - Back button on workspace editor reopens Workflows after adding workflow [$250] Workflows - Back button on workspace editor reopens Workflows after adding workflow Aug 15, 2024
@melvin-bot melvin-bot bot added the Help Wanted Apply this label when an issue is open to proposals by contributors label Aug 15, 2024
Copy link

melvin-bot bot commented Aug 15, 2024

Triggered auto assignment to Contributor-plus team member for initial proposal review - @shubham1206agra (External)

@DylanDylann
Copy link
Contributor

DylanDylann commented Aug 16, 2024

@blazejkustra it seems this relates to the navigation bug that we discussed before. Should we want to take over this one with a navigation bug here

cc @JmillsExpensify

@shubham1206agra
Copy link
Contributor

@DylanDylann I am not sure that the fix will be simple since I encountered this problem before too. And @bernhardoj's proposal fixes the issue without any side effects. So lets go with that right now.

🎀👀🎀 C+ reviewed

Copy link

melvin-bot bot commented Aug 16, 2024

Current assignee @blimpich is eligible for the choreEngineerContributorManagement assigner, not assigning anyone new.

@shubham1206agra
Copy link
Contributor

@DylanDylann
Copy link
Contributor

@shubham1206agra @bernhardoj You mean that we should remove naviagte function and only use goBack, right?

@shubham1206agra
Copy link
Contributor

No remove fallback route

@DylanDylann
Copy link
Contributor

When we are creating a new approval workflow, we go from selecting members step -> selecting approver step. At this point, the rhp nav stack is: [select member, select approver]. When we go next again, both screens are removed and replaced with the confirmation page.

@tgolen @blazejkustra I believe that this bug has the same RCA as the navigation bug that we discussed in previous PR

@blimpich @shubham1206agra Maybe the navigation in the approval workflow feature will be updated soon and this bug will no longer reproduce. Let's wait for a thought from @blazejkustra

@blazejkustra
Copy link
Contributor

blazejkustra commented Aug 19, 2024

I agree with @DylanDylann, let's wait with this issue for now.

@melvin-bot melvin-bot bot added the Overdue label Aug 19, 2024
@isabelastisser isabelastisser added Weekly KSv2 and removed Daily KSv2 labels Aug 19, 2024
@melvin-bot melvin-bot bot removed the Overdue label Aug 19, 2024
@isabelastisser
Copy link
Contributor

On hold!

@DylanDylann
Copy link
Contributor

Hold: #47697

Copy link

melvin-bot bot commented Aug 22, 2024

📣 It's been a week! Do we have any satisfactory proposals yet? Do we need to adjust the bounty for this issue? 💸

@blazejkustra
Copy link
Contributor

Should be resolved now with #47845 merged

@blimpich
Copy link
Contributor

@shubham1206agra @bernhardoj are either of you able to reproduce the issue here?

@bernhardoj
Copy link
Contributor

It's not reproducible anymore.

@isabelastisser
Copy link
Contributor

Thanks for confirming, @bernhardoj! Closing this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something is broken. Auto assigns a BugZero manager. Engineering External Added to denote the issue can be worked on by a contributor Help Wanted Apply this label when an issue is open to proposals by contributors Weekly KSv2
Projects
No open projects
Status: Done
Development

No branches or pull requests

8 participants