Skip to content

Category rules - "Approver" is enabled when "Add approvals" is still disabled in Workflows #48977

Closed

Description

@IuliiaHerets

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.32-0
Reproducible in staging?: Y
Reproducible in production?: N/A
Issue was found when executing this PR: #48171
Email or phone of affected tester (no customers): applausetester+kh010901@applause.expensifail.com
Issue reported by: Applause Internal Team

Action Performed:

Precondition:

  • Rules feature is enabled.
  1. Go to staging.new.expensify.com
  2. Go to workspace settings > Categories.
  3. Click on any category.
  4. Note that the message under Approver says that "add approvals to unlock this feature".
  5. Go to Rules.
  6. Note that the same message is also said for "Prevent self-approvals".
  7. Go to workspace settings.
  8. Enable workflows, but do not enable Add approvals in Workflows page.
  9. Go back to Rules.
  10. Note that "Prevent self-approvals" is disabled because Add approvals feature is not enabled so the feature remains locked.
  11. Go back to the same category in Step 3.
  12. Note that Approver feature is unlocked even though Add approvals feature is not enabled.

Expected Result:

In Step 12, Approver feature should remain locked until Add approvals feature is enabled on Workflows page.

Actual Result:

In Step 12, Approver feature is unlocked when Add approvals feature is disabled on Workflows page, which is inconsistent with the behavior with "Prevent self-approvals" feature in Rules in Step 10.

Workaround:

Unknown

Platforms:

  • Android: Native
  • Android: mWeb Chrome
  • iOS: Native
  • iOS: mWeb Safari
  • MacOS: Chrome / Safari
  • [x ] MacOS: Desktop

Screenshots/Videos

Bug6599647_1726041745900.20240911_155552.mp4

View all open jobs on GitHub

Activity

  1. added
    DeployBlockerCashThis issue or pull request should block deployment
    BugSomething is broken. Auto assigns a BugZero manager.
    on Sep 11, 2024
  2. melvin-bot commented on Sep 11, 2024

    @melvin-bot

    Triggered auto assignment to @mallenexpensify (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. melvin-bot commented on Sep 11, 2024

    @melvin-bot

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

  4. github-actions commented on Sep 11, 2024

    @github-actions
    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.
  5. IuliiaHerets commented on Sep 11, 2024

    @IuliiaHerets
    Author

    We think that this bug might be related to #wave-control

  6. Nodebrute commented on Sep 11, 2024

    @Nodebrute
    Contributor

    Edited by proposal-police: This proposal was edited at 2023-11-04T12:30:45Z.

    Proposal

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

    "Approver" is enabled when "Add approvals" is still disabled in Workflows

    What is the root cause of that problem?

    We are only checking if workflows are enabled

    {!policy?.areWorkflowsEnabled && (

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

    We should use const workflowApprovalsUnavailable = PolicyUtils.getWorkflowApprovalsUnavailable(policy);
    and then use it here instead of areWorkflowsEnabled

      {workflowApprovalsUnavailable && (
    

    Optional: we can also change the condition here to workflowApprovalsUnavailable

    What alternative solutions did you explore? (Optional)

  7. mjasikowski commented on Sep 11, 2024

    @mjasikowski
    Contributor

    tagging @WojtekBoman as the original author of #48171

  8. BrtqKr commented on Sep 11, 2024

    @BrtqKr
    Contributor

    #48325 (comment)

    is this related?

  9. 12 remaining items

  10. marcaaron commented on Sep 16, 2024

    @marcaaron
    Contributor

    Agree we should stick to the Design Doc on this one. It's hard to tell whether we are blocked on anything here, but sounds like @WojtekBoman is on the case. @mjasikowski I can take this off your hands since I am leading this project - but fine if you want to stick around 😄

  11. mjasikowski commented on Sep 20, 2024

    @mjasikowski
    Contributor

    @marcaaron feel free to take over, I'm OOO frequently now due to personal issues

  12. melvin-bot commented on Sep 20, 2024

    @melvin-bot

    ⚠️ Looks like this issue was linked to a Deploy Blocker here

    If you are the assigned CME please investigate whether the linked PR caused a regression and leave a comment with the results.

    If a regression has occurred and you are the assigned CM follow the instructions here.

    If this regression could have been avoided please consider also proposing a recommendation to the PR checklist so that we can avoid it in the future.

  13. marcaaron commented on Sep 23, 2024

    @marcaaron
    Contributor

    I see this has been fixed on staging so I think we can close it out.

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

Metadata

Metadata

Labels

BugSomething is broken. Auto assigns a BugZero manager.EngineeringReviewingHas a PR in reviewWeeklyKSv2

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions