App: [HOLD for payment 2024-02-15] [$500] New Distance Requests Should Default to the "Default Distance Category"

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: v1.4.14-0 Reproducible in staging?: Y Reproducible in production?: Y If this was caught during regression testing, add the test name, ID and link from TestRail: N/A Email or phone of affected tester (no customers): yuwen@expensify.com Logs: N/A Expensify/Expensify Issue URL: N/A Issue reported by: @yuwenmemon Slack conversation: https://expensify.slack.com/archives/C05DWUDHVK7/p1702928915733459

Action Performed:

Break down in numbered steps

  1. In the OldDot policy editor, navigate to Workspace -> Expenses -> Distance
  2. Set a Default Distance Category: Screenshot 2023-12-20 at 3 56 53 PM Screenshot 2023-12-20 at 3 59 55 PM

1(a). Alternatively, if you done have access to your Workspace in OldDot, set a default category for the distance unit via JS on OldDot:

const p = Policy.getByID('<workspace ID>');
p.policy.customUnits[0].defaultCategory = 'Advertising'; // check the index though
p.save();
  1. As a submitter, Navigate to the Workspace Chat in NewDot
  2. Create a new distance request without an explicit category. Follow the steps all the way until the confirmation step: Screenshot 2023-12-20 at 3 58 18 PM

Expected Result:

The distance request should have the default category filled in by default

Actual Result:

The category field is blank

Workaround:

The default category will be set in the back end via https://github.com/Expensify/Auth/pull/9488, but we should still have this set for users in the front-end so the setting does not come as a suprise.

Platforms:

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

  • Android: Native
  • Android: mWeb Chrome
  • iOS: Native
  • iOS: mWeb Safari
  • MacOS: Chrome / Safari
  • MacOS: Desktop

Screenshots/Videos

https://github.com/Expensify/App/assets/4741899/5b6ee5c7-bc6d-46b6-8ac4-2387765ccb95

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~01d091e9e76b7055e0
  • Upwork Job ID: 1737625066164363264
  • Last Price Increase: 2023-12-28

About this issue

  • Original URL
  • State: closed
  • Created 6 months ago
  • Comments: 28 (10 by maintainers)

Most upvoted comments

Payment Summary

Upwork Job

BugZero Checklist (@strepanier03)

  • I have verified the correct assignees and roles are listed above and updated the neccesary manual offers
  • I have verified that there are no duplicate or incorrect contracts on Upwork for this job (https://www.upwork.com/ab/applicants/1737625066164363264/hired)
  • I have paid out the Upwork contracts or cancelled the ones that are incorrect
  • I have verified the payment summary above is correct

This is new feature

Regression Test Proposal

  1. In OD policy editor, go to Workspace >> Expenses >> Distance
  2. Set a Default Distance Category
  3. Navigate to the workspace chat in ND
  4. Create a new distance request without an explicit category, follow the steps until the confirmation screen
  5. Verify that the category field is set with the default category from step 2