Expensify / App

Welcome to New Expensify: a complete re-imagination of financial collaboration, centered around chat. Help us build the next generation of Expensify by sharing feedback and contributing to the code.
https://new.expensify.com
MIT License
4.03k stars 3.03k forks source link

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

Open MitchExpensify opened 1 week ago

MitchExpensify commented 1 week ago

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?

View all open jobs on GitHub

Issue OwnerCurrent Issue Owner: @abdulrahuman5196
melvin-bot[bot] commented 1 week ago

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

melvin-bot[bot] commented 1 week ago

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[bot] commented 1 week ago

:warning: 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 :warning:

melvin-bot[bot] commented 1 week ago

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

MitchExpensify commented 1 week ago

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

twilight2294 commented 1 week ago

🚨 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: https://github.com/Expensify/App/blob/96af045d4b4a601cae0feb1229020c2ba7673273/src/libs/actions/Policy/Policy.ts#L1768-L1772

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,
                },

https://github.com/Expensify/App/blob/96af045d4b4a601cae0feb1229020c2ba7673273/src/types/onyx/Policy.ts#L1630-L1631

Make the same in the below cases too:

https://github.com/Expensify/App/blob/96af045d4b4a601cae0feb1229020c2ba7673273/src/libs/actions/Policy/Policy.ts#L2410-L2414

https://github.com/Expensify/App/blob/96af045d4b4a601cae0feb1229020c2ba7673273/src/libs/actions/Policy/Policy.ts#L2097-L2101 https://github.com/Expensify/App/blob/96af045d4b4a601cae0feb1229020c2ba7673273/src/libs/actions/Policy/Policy.ts#L1678 https://github.com/Expensify/App/blob/96af045d4b4a601cae0feb1229020c2ba7673273/src/libs/actions/Policy/Policy.ts#L1688-L1690 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)

github-actions[bot] commented 1 week ago

⚠️ @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 commented 1 week ago

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

twilight2294 commented 1 week ago

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

Krishna2323 commented 1 week ago

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?

dangrous commented 1 week ago

Backend PR is in review!

twilight2294 commented 1 week ago

@abdulrahuman5196 can you please review my proposal here

abdulrahuman5196 commented 1 week ago

~@MitchExpensify Could you kindly re-assign this to different C+ if this is urgent?~

allgandalf commented 1 week ago

I can pick it up as C+ otherwise 👋

abdulrahuman5196 commented 1 week ago

Sorry for the confusion. I will review today

abdulrahuman5196 commented 1 week ago

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?

Krishna2323 commented 1 week ago

@abdulrahuman5196, FYI the first proposal doesn't cover updating the setWorkspaceAutoReportingFrequency in WorkspaceWorkflowsPage which would have definitely caused regression. Please take that into consideration when evaluating proposals. Thanks!

twilight2294 commented 1 week ago

@Krishna2323 C+ knows the best i think,

Also the point you mentioned is mere implementation detail and not has any new addition to the proposal, thanks, waiting for your analysis @abdulrahuman5196 🙇

Krishna2323 commented 1 week ago

@twilight2294 you clearly missed out that important implementation and here it's important to fix all places because the solution is very straightforward. Please wait for C+ decision, I just made my point infront of @abdulrahuman5196.

twilight2294 commented 1 week ago

you clearly missed out that important implementation and here it's important to fix all places because the solution is very straightforward

I guess that is upto the C+ to decide, so i request you to please be patient here @Krishna2323 🙏

I anyway think that you just copied my proposal and are now just making statements to change course here

@abdulrahuman5196 also note that according to new guidelines, unit/ UI tests are also important and i think should be given a priority as it is mentioned that we are increasing the quality of the app and need to have unit / ui tests whereever we can so my proposal is complete in this sense, and @Krishna2323 didn't suggest any UI/ unit tests, so their proposal is incomplete anyway

dangrous commented 6 days ago

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?

Backend code needed a fix, which is now in review. So we can wait a few days if you like!

melvin-bot[bot] commented 3 days ago

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

NicMendonca commented 3 days ago

@dangrous any update here?

dangrous commented 3 days ago

BE PR is now merged, just waiting for deploy

twilight2294 commented 11 hours ago

@abdulrahuman5196 friendly bump