Skip to content

[HIGH] Move the policy harvesting enabled property to harvesting key #35398

Description

@mountiny

Problem

The policy.isHarvestingEnabled property does not exist in this shape in our policy data in database. Its saved as policy.harvesting.enabled : boolean. Given we are updating how the policy changes are being saved and propagated to the clients, its cleaner to keep this structure same in Onyx as well. Having different code and different data schema throughout the stack results in less straightforward, more confusing, and more bug prone code

Solution

Update the Policy schema and usage of the policy.isHarvestingEnabled property to expect this data in policy.harvesting.enabled : boolean format. Update the backend API to also return the data in this shape.

Steps:

  1. Update the App to accept both formats. If policy.harvesting.enabled is not available, fallback to policy.isHarvestingEnabled in the mean time
  2. Update Web to send the data as policy.harvesting.enabled
  3. Update Auth to do the same
  4. Remove the fallback for policy.isHarvestingEnabled from the App

cc @rezkiy37 FYI since we will need to update this in the NextSteps PR

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~0116f6d2cfa2b62a8d
  • Upwork Job ID: 1752318583281709056
  • Last Price Increase: 2024-01-30

Metadata

Metadata

Labels

DailyKSv2InternalRequires API changes or must be handled by Expensify staffNewFeatureSomething to build that is a new item.ReviewingHas a PR in review

Type

No type

Fields

No fields configured for issues without a type.

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions