Skip to content

[Due for payment 2025-02-26] [$250] Workflow - Added approval workflow doesn't respond to clicks for editing #49954

Closed

Description

@lanitochka17

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.41-4
Reproducible in staging?: Y
Reproducible in production?: Y
If this was caught during regression testing, add the test name, ID and link from TestRail: N/A
Email or phone of affected tester (no customers): biruknew45+1233@gmail.com
Issue reported by: Applause - Internal Team

Action Performed:

  1. Go to https://staging.new.expensify.com/
  2. Create a new workspace
  3. Add two members
  4. Enable workflow and add an approval workflow
  5. Assign one member as a submitter and the other as an approver
  6. Go to members and remove the approver from the workspace
  7. Navigate to workflow and try to edit the approval workflow by clicking on it

Expected Result:

The approval workflow should respond to clicks and allow editing. And no console error appears

Actual Result:

The approval workflow doesn't respond to clicks or allow editing, and a console error appears when clicked

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

Add any screenshot/video evidence

Bug6620277_1727719505846.1.mp4

1727719477781!1

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~021841196137055865155
  • Upwork Job ID: 1841196137055865155
  • Last Price Increase: 2024-12-03
  • Automatic offers:
    • huult | Contributor | 105192531
Issue OwnerCurrent Issue Owner: @isabelastisser

Activity

  1. added
    BugSomething is broken. Auto assigns a BugZero manager.
    on Sep 30, 2024
  2. melvin-bot commented on Sep 30, 2024

    @melvin-bot

    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.

  3. lanitochka17 commented on Sep 30, 2024

    @lanitochka17
    Author

    @isabelastisser 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

  4. lanitochka17 commented on Sep 30, 2024

    @lanitochka17
    Author

    We think that this bug might be related to #wave-collect - Release 1

  5. Nodebrute commented on Sep 30, 2024

    @Nodebrute
    Contributor

    Edited by proposal-police: This proposal was edited at 2024-09-30 19:16:16 UTC.

    Proposal

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

    Added approval workflow doesn't respond to clicks for editing

    What is the root cause of that problem?

    We are not using optional chaining here

    onPress={() => Navigation.navigate(ROUTES.WORKSPACE_WORKFLOWS_APPROVALS_EDIT.getRoute(route.params.policyID, workflow.approvers[0].email))}

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

    We should use workflow.approvers[0]?.email

    onPress={() => Navigation.navigate(ROUTES.WORKSPACE_WORKFLOWS_APPROVALS_EDIT.getRoute(route.params.policyID, workflow.approvers[0].email))}

    Or we can use workflow?.approvers[0]?.email

    What alternative solutions did you explore? (Optional)

  6. huult commented on Oct 1, 2024

    @huult
  7. truph01 commented on Oct 1, 2024

    @truph01
    Contributor

    IMO, I think this is BE bug. We already set the employeeList properly when removing any member:

    Object.keys(policy?.employeeList ?? {}).forEach((employeeEmail) => {
    const employee = policy?.employeeList?.[employeeEmail];
    optimisticMembersState[employeeEmail] = optimisticMembersState[employeeEmail] ?? {};
    failureMembersState[employeeEmail] = failureMembersState[employeeEmail] ?? {};
    if (employee?.submitsTo && emailList.includes(employee?.submitsTo)) {
    optimisticMembersState[employeeEmail] = {
    ...optimisticMembersState[employeeEmail],
    submitsTo: policy?.owner,
    };
    failureMembersState[employeeEmail] = {
    ...failureMembersState[employeeEmail],
    submitsTo: employee?.submitsTo,
    };
    }
    if (employee?.forwardsTo && emailList.includes(employee?.forwardsTo)) {
    optimisticMembersState[employeeEmail] = {
    ...optimisticMembersState[employeeEmail],
    forwardsTo: policy?.owner,
    };
    failureMembersState[employeeEmail] = {
    ...failureMembersState[employeeEmail],
    forwardsTo: employee?.forwardsTo,
    };
    }
    if (employee?.overLimitForwardsTo && emailList.includes(employee?.overLimitForwardsTo)) {
    optimisticMembersState[employeeEmail] = {
    ...optimisticMembersState[employeeEmail],
    overLimitForwardsTo: policy?.owner,
    };
    failureMembersState[employeeEmail] = {
    ...failureMembersState[employeeEmail],
    overLimitForwardsTo: employee?.overLimitForwardsTo,
    };
    }
    });

    but after visiting workflow page, the API returns incorrect employee value.

  8. added
    ExternalAdded to denote the issue can be worked on by a contributor
    Help WantedApply this label when an issue is open to proposals by contributors
    on Oct 1, 2024
  9. changed the title [-]Workflow - Added approval workflow doesn't respond to clicks for editing[/-] [+][$250] Workflow - Added approval workflow doesn't respond to clicks for editing[/+] on Oct 1, 2024
  10. melvin-bot commented on Oct 1, 2024

    @melvin-bot
  11. 165 remaining items

  12. isabelastisser commented on Feb 19, 2025

    @isabelastisser
    Contributor

    BugZero Checklist:

    Bug classification

    Source of bug:

    • 1a. Result of the original design (eg. a case wasn't considered)
    • 1b. Mistake during implementation
    • 1c. Backend bug
    • 1z. Other:

    Where bug was reported:

    • 2a. Reported on production (eg. bug slipped through the normal regression and PR testing process on staging)
    • 2b. Reported on staging (eg. found during regression or PR testing)
    • 2d. Reported on a PR
    • 2z. Other:

    Who reported the bug:

    • 3a. Expensify user
    • 3b. Expensify employee
    • 3c. Contributor
    • 3d. QA
    • 3z. Other:
    • ** @getusha** 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:

    • @getusha 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.

      Link to discussion:

    • @getusha 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.

    Regression Test Proposal Template
    • @isabelastisser Create a GH issue for creating/updating the regression test once above steps have been agreed upon.

      Link to issue:

    Regression Test Proposal

    Precondition:

    Test:

    Do we agree 👍 or 👎

  13. isabelastisser commented on Feb 25, 2025

    @isabelastisser
    Contributor

    @getusha, please complete the checklist before payment. Thanks!

  14. getusha commented on Feb 25, 2025

    @getusha
    Contributor

    BugZero Checklist:

    • [Contributor] Classify the bug:
    Bug classification

    Source of bug:

    • 1a. Result of the original design (eg. a case wasn't considered)
    • 1b. Mistake during implementation
    • 1c. Backend bug
    • 1z. Other:

    Where bug was reported:

    • 2a. Reported on production (eg. bug slipped through the normal regression and PR testing process on staging)
    • 2b. Reported on staging (eg. found during regression or PR testing)
    • 2d. Reported on a PR
    • 2z. Other:

    Who reported the bug:

    • 3a. Expensify user
    • 3b. Expensify employee
    • 3c. Contributor
    • 3d. QA
    • 3z. Other:
    • [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: N/a

    • [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.

      Link to discussion: N/a

    • [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.
      I think one case is enough since we have the cases covered in a unit test

    • [BugZero Assignee] Create a GH issue for creating/updating the regression test once above steps have been agreed upon.

      Link to issue:

    Regression Test Proposal

    Precondition:

    • Create a workspace
    • Enable workflows
    • Add Several members to the workspace

    Test:

    1. Navigate to the workspace you just created
    2. Navigate to Workflows
    3. Add approval workflow
    4. Select memberA to "Expenses from"
    5. Select memberB as Approver
    6. Navigate to members page
    7. Remove memberB
    8. Verify that workflow 1 now has the workspace owner as an approver
    9. Press on the workflow
    10. Verify you are navigated to Edit approval workflow page

    Do we agree 👍 or 👎

  15. huult commented on Feb 27, 2025

    @huult
    Contributor

    @isabelastisser friendly bump for payment 🙏

  16. isabelastisser commented on Feb 28, 2025

    @isabelastisser
    Contributor

    Payment summary:

    • @huult requires payment / contributor / $250 / automatic offer (Contributor) Paid in Upwork
    • @getusha requires payment through NewDot Manual Requests / C+ review / $250 / pending payment in ND
  17. isabelastisser commented on Feb 28, 2025

    @isabelastisser
    Contributor

    all set!

  18. moved this from Bugs and Follow Up Issues to Done in #expensify-bugson Feb 28, 2025
  19. garrettmknight commented on Mar 11, 2025

    @garrettmknight
    Contributor

    $250 approved for @getusha

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

Awaiting PaymentAuto-added when associated PR is deployed to productionBugSomething is broken. Auto assigns a BugZero manager.DailyKSv2ExternalAdded to denote the issue can be worked on by a contributor

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions