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] Enable "Add approvals" by default on new Workspaces #55612

Open
8 tasks done
MitchExpensify opened this issue Jan 22, 2025 · 9 comments
Open
8 tasks done

[$250] Enable "Add approvals" by default on new Workspaces #55612

MitchExpensify opened this issue Jan 22, 2025 · 9 comments
Assignees
Labels
Daily KSv2 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 NewFeature Something to build that is a new item.

Comments

@MitchExpensify
Copy link
Contributor

MitchExpensify commented Jan 22, 2025

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: v9.0.87-3
Issue reported by: @anmurali
Slack conversation (hyperlinked to channel name): Internal https://expensify.slack.com/archives/C07HPDRELLD/p1736799277819639

Action Performed:

  1. Sign up as a new user
  2. Choose "Manage my team's expenses" (This create a new Workspace)
  3. Open workspace settings
  4. Open the Workflow tab

Expected Result (New Feature):

See the "Add approvals" feature enabled in the "Workflows" tab

Actual Result:

"Add approvals" feature is disabled in the "Workflows" tab

Workaround:

Enable it..

Problem: Data shows that the majority of our paying customers actively use workspace features that are disabled by default in New Expensify. For example, over 70% of Collect workspaces in Classic have Submit and Approve enabled, but these features are disabled by default in New Expensify workspaces. This misalignment reduces the discoverability of popular features, adds unnecessary friction to the onboarding process, and risks undermining customer satisfaction by not meeting their expectations.

Platforms:

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

  • Android: Standalone
  • Android: HybridApp
  • Android: mWeb Chrome
  • iOS: Standalone
  • iOS: HybridApp
  • iOS: mWeb Safari
  • MacOS: Chrome / Safari
  • MacOS: Desktop

Screenshots/Videos

Add any screenshot/video evidence

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~021882101412584019150
  • Upwork Job ID: 1882101412584019150
  • Last Price Increase: 2025-01-22
Issue OwnerCurrent Issue Owner: @paultsimura
@MitchExpensify MitchExpensify added Daily KSv2 NewFeature Something to build that is a new item. labels Jan 22, 2025
Copy link

melvin-bot bot commented Jan 22, 2025

Triggered auto assignment to @joekaufmanexpensify (NewFeature), see https://stackoverflowteams.com/c/expensify/questions/14418#:~:text=BugZero%20process%20steps%20for%20feature%20requests for more details. Please add this Feature request to a GH project, as outlined in the SO.

@melvin-bot melvin-bot bot added Weekly KSv2 and removed Daily KSv2 labels Jan 22, 2025
Copy link

melvin-bot bot commented Jan 22, 2025

⚠️ It looks like this issue is labelled as a New Feature but not tied to any GitHub Project. Keep in mind that all new features should be tied to GitHub Projects in order to properly track external CAP software time ⚠️

Copy link

melvin-bot bot commented Jan 22, 2025

Triggered auto assignment to Design team member for new feature review - @dannymcclain (NewFeature)

@nkdengineer
Copy link
Contributor

nkdengineer commented Jan 22, 2025

🚨 Edited by proposal-police: This proposal was edited at 2025-01-22 15:59:27 UTC.

Proposal

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

"Add approvals" feature is disabled in the "Workflows" tab

What is the root cause of that problem?

This is a new feature

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

When we create a new workspace, enable the workflow feature by default and set the approvalMode as BASIC in optimistic data. And the backend should also implement this when a new workspace is created

approvalMode: CONST.POLICY.APPROVAL_MODE.BASIC,
areWorkflowsEnabled: true,

const optimisticData: OnyxUpdate[] = [

Or we can only do this if engagementChoice is Manage my team

What specific scenarios should we cover in automated tests to prevent reintroducing this issue in the future?

We need add another test case or update the existing test for CreateWorkspace API and verify that the areWorkflowsEnabled is true and approvalMode is BASIC.

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.

@melvin-bot melvin-bot bot added Daily KSv2 and removed Weekly KSv2 labels Jan 22, 2025
@joekaufmanexpensify joekaufmanexpensify added the External Added to denote the issue can be worked on by a contributor label Jan 22, 2025
@melvin-bot melvin-bot bot changed the title Enable "Add approvals" by default on new Workspaces [$250] Enable "Add approvals" by default on new Workspaces Jan 22, 2025
Copy link

melvin-bot bot commented Jan 22, 2025

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

@melvin-bot melvin-bot bot added the Help Wanted Apply this label when an issue is open to proposals by contributors label Jan 22, 2025
Copy link

melvin-bot bot commented Jan 22, 2025

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

@dannymcclain
Copy link
Contributor

@joekaufmanexpensify I know I was assigned automatically based on the New Feature label, but do you think this actually needs any design input? Seems pretty straight forward and there aren't really any changes to the UI/design needed, right?

@joekaufmanexpensify
Copy link
Contributor

Agreed! Feel free to drop off.

@dannymcclain dannymcclain removed their assignment Jan 22, 2025
@FitseTLT
Copy link
Contributor

FitseTLT commented Jan 22, 2025

Proposal

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

Enable "Add approvals" by default on new Workspaces

What is the root cause of that problem?

New Feature

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

We need to optimistically set

approvalMode: CONST.POLICY.APPROVAL_MODE.BASIC,
areWorkflowsEnabled: true,
approver: policyOwner

in buildPolicyData

                ...(engagementChoice === CONST.ONBOARDING_CHOICES.MANAGE_TEAM && {approver: sessionEmail, approvalMode: CONST.POLICY.APPROVAL_MODE.BASIC, areWorkflowsEnabled: true}),

and apply parallel changes also in BE/CREATE_WORKSPACE to align with this.
We can apply the change either for the case only engagementChoice === CONST.ONBOARDING_CHOICES.MANAGE_TEAM or apply it to every workspace creation as needed. But whether or not we apply the change for add approval conditionally for manage team engagement, the areWorkflowsEnabled are now being set to true by the BE for any workspace created so we need to set it to true optimistically unconditionally.

Moreover, to allow default approval workflow to be shown in offline we need to add missing email and submitsTo for the owner employee list ( like the BE sets) here

[sessionEmail]: {
role: CONST.POLICY.ROLE.ADMIN,

[sessionEmail]: {
                        role: CONST.POLICY.ROLE.ADMIN,
                        submitsTo: sessionEmail,
                        email: sessionEmail,

We can also update isAutoApprovalEnabled to false same as the BE does when turning on add approvals.

What specific scenarios should we cover in automated tests to prevent reintroducing this issue in the future?

We will create a test for buildPolicyData to assert that it is setting the necessary workflow setting values to the policy

What alternative solutions did you explore? (Optional)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Daily KSv2 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 NewFeature Something to build that is a new item.
Projects
Status: No status
Development

No branches or pull requests

6 participants