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

Set "Delayed submission" to "Manually" by default on new Workspaces #56367

Open
8 tasks done
MitchExpensify opened this issue Feb 4, 2025 · 54 comments
Open
8 tasks done
Assignees
Labels
External Added to denote the issue can be worked on by a contributor NewFeature Something to build that is a new item. Reviewing Has a PR in review Weekly KSv2

Comments

@MitchExpensify
Copy link
Contributor

MitchExpensify commented Feb 4, 2025

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

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 have Scheduled Submit set to Manual or Off but "Delayed submission" is disabled by default in New Expensify workspaces. This misalignment adds unnecessary friction to the onboarding process and risks undermining customer satisfaction by not meeting their expectations more directly in the window shopping phase, thus risking conversion.

Solution

Set "Delayed submission" to Manually by default on new Workspaces likely to have more than one member:

  1. when your introSelected value is empty
  2. your introSelected value is newDotManageTeam (“Manage my team’s expenses) or newDotLookingAround (“Something else”).
  3. If we create a workspace via the Submit > “Pay with business bank account” flow (convertIOUToExpenseReport) regardless of the introSelected onboarding intent.

Action Performed:

Situation 1: introSelected value is newDotManageTeam

  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

Situation 2: introSelected value is empty

  1. Sign up as a new user
  2. Dismiss the onboarding modal
  3. Create a workspace
  4. Open workspace settings
  5. Open the Workflow tab

Situation 3: Bottom Up

  1. As account A, send an expense to account B (Brand new account with no workspaces)
  2. As Account B go to pay the expense with a business bank account

Expected Result (New Feature):

See the "Delayed submission" feature enabled and set to "Manually in the "Workflows" tab

Actual Result:

"Delayed submission" feature is disabled in the "Workflows" tab

Workaround:

Edit the setting manually

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

View all open jobs on GitHub

Issue OwnerCurrent Issue Owner: @abdulrahuman5196
@MitchExpensify MitchExpensify added Daily KSv2 External Added to denote the issue can be worked on by a contributor NewFeature Something to build that is a new item. labels Feb 4, 2025
@melvin-bot melvin-bot bot added the Help Wanted Apply this label when an issue is open to proposals by contributors label Feb 4, 2025
Copy link

melvin-bot bot commented Feb 4, 2025

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

Copy link

melvin-bot bot commented Feb 4, 2025

Triggered auto assignment to @NicMendonca (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 Feb 4, 2025
Copy link

melvin-bot bot commented Feb 4, 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 Feb 4, 2025

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

@MitchExpensify
Copy link
Contributor Author

I don't think this change requires design because its using 100% existing components

@twilight2294
Copy link
Contributor

twilight2294 commented Feb 4, 2025

🚨 Edited by proposal-police: This proposal was edited at 2025-02-04 18:26:51 UTC.

Proposal

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

Set "Delayed submission" to "Manually" by default on new Workspaces

What is the root cause of that problem?

Feature request

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

Update the following:

autoReportingFrequency: CONST.POLICY.AUTO_REPORTING_FREQUENCIES.INSTANT,
approvalMode: CONST.POLICY.APPROVAL_MODE.OPTIONAL,
harvesting: {
enabled: true,
},

to

                autoReportingFrequency: CONST.POLICY.AUTO_REPORTING_FREQUENCIES.IMMEDIATE, / MANUAL (not sure about this value, will discuss more during PR phase, it's most probably immediate as seen in `SetWorkspaceAutoReportingFrequency`)
                approvalMode: CONST.POLICY.APPROVAL_MODE.OPTIONAL,
                harvesting: {
                    enabled: false,
                },

App/src/types/onyx/Policy.ts

Lines 1630 to 1631 in 96af045

* Note that manual does not exist in the DB and thus should not exist in Onyx, only as a param for the API.
* "manual" really means "immediate" (aka "daily") && harvesting.enabled === false

Make the same in the below cases too:

autoReportingFrequency: CONST.POLICY.AUTO_REPORTING_FREQUENCIES.INSTANT,
approvalMode: CONST.POLICY.APPROVAL_MODE.OPTIONAL,
harvesting: {
enabled: true,
},

autoReportingFrequency: CONST.POLICY.AUTO_REPORTING_FREQUENCIES.INSTANT,
approvalMode: CONST.POLICY.APPROVAL_MODE.OPTIONAL,
harvesting: {
enabled: true,
},

autoReportingFrequency: CONST.POLICY.AUTO_REPORTING_FREQUENCIES.INSTANT,

harvesting: {
enabled: true,
},

There might be some existing unit tests which will fail once we make these changes so we need to update those too

We also need BE changes here to match the optimistic data

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

We can create a policy using onyx data and either write a unit test or a UI test for workflows screen to see if the toggle for delayed submit is on and the submission frequency is set to manually

What alternative solutions did you explore? (Optional)

@melvin-bot melvin-bot bot added Daily KSv2 and removed Weekly KSv2 labels Feb 4, 2025
Copy link
Contributor

github-actions bot commented Feb 4, 2025

⚠️ @twilight2294 Thanks for your proposal. Please update it to follow the proposal template, as proposals are only reviewed if they follow that format (note the mandatory sections).

@dangrous
Copy link
Contributor

dangrous commented Feb 4, 2025

i'll take care of the backend changes needed for this one

@twilight2294
Copy link
Contributor

@dangrous can you review my proposal here? I guess it's complete as is and matches the expected result

@Krishna2323
Copy link
Contributor

Proposal

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

Set "Delayed submission" to "Manually" by default on new Workspaces

What is the root cause of that problem?

Improvement

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

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


  • I don't think unit tests are required here since this is a simple optimistic value change.
  • If any existing unit test fails, we can update those.

What alternative solutions did you explore? (Optional)

@dangrous
Copy link
Contributor

dangrous commented Feb 5, 2025

Backend PR is in review!

@twilight2294
Copy link
Contributor

@abdulrahuman5196 can you please review my proposal here

@abdulrahuman5196

This comment has been minimized.

@allgandalf

This comment has been minimized.

@abdulrahuman5196
Copy link
Contributor

abdulrahuman5196 commented Feb 7, 2025

Sorry for the confusion. I will review today

@abdulrahuman5196
Copy link
Contributor

Hi @dangrous , Currently I am able to verify the proposals only in offline mode since the backend change is not in production yet and current backend response is disabling the Delayed Submission. Both the proposals are almost same.
Should I wait for the backend change to come to staging and verify or provide the proposal approval now?

@melvin-bot melvin-bot bot added the Overdue label Feb 23, 2025
Copy link

melvin-bot bot commented Feb 24, 2025

@dangrous, @NicMendonca, @abdulrahuman5196 Uh oh! This issue is overdue by 2 days. Don't forget to update your issues!

@dangrous
Copy link
Contributor

@abdulrahuman5196 how are we looking on proposal review? Thanks!

@abdulrahuman5196
Copy link
Contributor

Sorry for the delay checking now again.

@melvin-bot melvin-bot bot removed the Overdue label Feb 25, 2025
@abdulrahuman5196
Copy link
Contributor

abdulrahuman5196 commented Feb 25, 2025

Hi @dangrous , After the backend change the issue is only reproducible while creating workspace in offline case. I was trying the proposal and it was working for setting Delayed Submission to manual, but one thing I noticed is the Add approvals section which is different in offline case and different after backend response. Do we need to update the approvers section as well or the below video expectation is fine? Or should that be a different issue not related to this one?

Screen.Recording.2025-02-25.at.8.39.46.PM.mov

@twilight2294
Copy link
Contributor

@abdulrahuman5196 the issue you mentioned is already being fixed in this PR:

@dangrous
Copy link
Contributor

Yeah as @twilight2294 said we're updating the optimistic behavior to match the backend, so you can just focus on the delayed submission bit. Thanks!

@abdulrahuman5196
Copy link
Contributor

abdulrahuman5196 commented Feb 26, 2025

Thank you for clarification. Got it.
@twilight2294 's proposal here #56367 (comment) looks good and works well. Although other proposal tried to cover more cases, since this is the first proposal to address the core issue, approving this.

🎀 👀 🎀
C+ Reviewed

@dangrous

Copy link

melvin-bot bot commented Feb 26, 2025

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

@parasharrajat
Copy link
Member

parasharrajat commented Feb 26, 2025

This seems like a duplicate as we are already doing this in #50391, but are we missing all cases @abdulrahuman5196 Can you check that PR and let us know.

@twilight2294
Copy link
Contributor

your PR is doing it for intent of manage teams, this issue fixes it holistally, so both are differently

@dangrous
Copy link
Contributor

ugh there are so many similar PRs. So if if #50391 is updating it for "manage team" and "something else" we still need it for:

  • when your introSelected value is empty
  • If we create a workspace via the Submit > “Pay with business bank account” flow (convertIOUToExpenseReport) regardless of the introSelected onboarding intent.

It looks like @twilight2294's solution will set it to manual, for ALL new workplaces, not just in those four cases, but that's a quick update. @parasharrajat / @mkzie2 do you want to add the additional cases to your PR, or should we fix them here.

The solutions themselves are pretty clear, but I want to make sure we're getting them out efficiently.

@MitchExpensify
Copy link
Contributor Author

It seems new Collect workspaces on Classic are defaulting to Instant submit. I expected us to copy the New Expensify approach of defaulting to "Manually". Was Classic intentionally left out or just a small oversight?

@parasharrajat
Copy link
Member

@mkzie2 What do you think? I am inclined towards merging #50391 asap.

@mkzie2
Copy link
Contributor

mkzie2 commented Feb 27, 2025

@parasharrajat Since our PR only covers two case onboarding purposes, I think delay submission can handle in this issue.

@parasharrajat
Copy link
Member

Ok, that works for me.

@twilight2294

This comment has been minimized.

@twilight2294
Copy link
Contributor

Thank you, @dangrous can you assign me here?

@MitchExpensify
Copy link
Contributor Author

It seems new Collect workspaces on Classic are defaulting to Instant submit. I expected us to copy the New Expensify approach of defaulting to "Manually". Was Classic intentionally left out or just a small oversight?

@dangrous, does it make sense to open a new issue for this? Slack convo: https://expensify.slack.com/archives/C03U7DCU4/p1740610255320019

@melvin-bot melvin-bot bot removed the Help Wanted Apply this label when an issue is open to proposals by contributors label Feb 27, 2025
@dangrous
Copy link
Contributor

assigned @twilight2294

@MitchExpensify - I was under the understanding that this was only for users that had gone through onboarding on New Dot, so we hadn't looked specifically at Classic. I can definitely take a look if we want to align those. A caveat - it will break a million tests, so we'll need to figure out which ones of those expected results need to be updated and which need to be updated to have different set ups. Which.... may take a long time. But I can start working on it.

Is there onboarding that happens in Classic as well? Do they ask the same questions? Or do we want them all doing it by default even without any specific input from the user?

TLDR yes a new issue would be great!

@parasharrajat
Copy link
Member

Please add the tests for these changes. @twilight2294

@MitchExpensify
Copy link
Contributor Author

TLDR yes a new issue would be great!

I will get to this

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
External Added to denote the issue can be worked on by a contributor NewFeature Something to build that is a new item. Reviewing Has a PR in review Weekly KSv2
Projects
Status: No status
Development

No branches or pull requests

10 participants