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

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

Closed
5 tasks done
IuliiaHerets opened this issue Sep 11, 2024 · 15 comments
Closed
5 tasks done
Assignees
Labels
Bug Something is broken. Auto assigns a BugZero manager. Engineering Reviewing Has a PR in review Weekly KSv2

Comments

@IuliiaHerets
Copy link

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

@IuliiaHerets IuliiaHerets added DeployBlockerCash This issue or pull request should block deployment Bug Something is broken. Auto assigns a BugZero manager. labels Sep 11, 2024
Copy link

melvin-bot bot commented Sep 11, 2024

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.

Copy link

melvin-bot bot commented Sep 11, 2024

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

@melvin-bot melvin-bot bot added the Daily KSv2 label Sep 11, 2024
@github-actions github-actions bot added Engineering Hourly KSv2 and removed Daily KSv2 labels Sep 11, 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.

@IuliiaHerets
Copy link
Author

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

@Nodebrute
Copy link
Contributor

Nodebrute commented Sep 11, 2024

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)

@mjasikowski
Copy link
Contributor

tagging @WojtekBoman as the original author of #48171

@BrtqKr
Copy link
Contributor

BrtqKr commented Sep 11, 2024

#48325 (comment)

is this related?

@mjasikowski
Copy link
Contributor

@BrtqKr seems so, albeit looking at the design doc and testing steps involved it seems that the initial requirement was to disable the Approver button and show the hint if approvals are not enabled.

image

This is consistent with proposed manual testing steps:

image

Seeing that @marcaaron won't be available for the next few hours to clarify, I would suggest to treat the design document as the source of truth and for @WojtekBoman to create a PR based on the above.

@WojtekBoman
Copy link
Contributor

I'll prepare a fix for that :)

@mjasikowski
Copy link
Contributor

This functionality is behind beta, removing the blocker label.

@mjasikowski mjasikowski added Daily KSv2 and removed DeployBlockerCash This issue or pull request should block deployment Hourly KSv2 labels Sep 11, 2024
@marcaaron marcaaron self-assigned this Sep 11, 2024
@melvin-bot melvin-bot bot added the Overdue label Sep 13, 2024
Copy link

melvin-bot bot commented Sep 16, 2024

@mjasikowski, @mallenexpensify, @marcaaron, @WojtekBoman Eep! 4 days overdue now. Issues have feelings too...

@marcaaron
Copy link
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 😄

@melvin-bot melvin-bot bot removed the Overdue label Sep 16, 2024
@mjasikowski
Copy link
Contributor

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

@melvin-bot melvin-bot bot removed the Overdue label Sep 20, 2024
Copy link

melvin-bot bot commented Sep 20, 2024

⚠️ 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.

@marcaaron
Copy link
Contributor

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

@github-project-automation github-project-automation bot moved this from Polish to Done in [#whatsnext] #expense Sep 23, 2024
@melvin-bot melvin-bot bot added Reviewing Has a PR in review Weekly KSv2 and removed Overdue Daily KSv2 labels Sep 23, 2024
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 Reviewing Has a PR in review Weekly KSv2
Projects
Status: Done
Development

No branches or pull requests

7 participants