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:
- Update the App to accept both formats. If
policy.harvesting.enabled is not available, fallback to policy.isHarvestingEnabled in the mean time
- Update Web to send the data as
policy.harvesting.enabled
- Update Auth to do the same
- 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
Problem
The
policy.isHarvestingEnabledproperty does not exist in this shape in our policy data in database. Its saved aspolicy.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 codeSolution
Update the Policy schema and usage of the
policy.isHarvestingEnabledproperty to expect this data inpolicy.harvesting.enabled : booleanformat. Update the backend API to also return the data in this shape.Steps:
policy.harvesting.enabledis not available, fallback topolicy.isHarvestingEnabledin the mean timepolicy.harvesting.enabledpolicy.isHarvestingEnabledfrom the Appcc @rezkiy37 FYI since we will need to update this in the NextSteps PR
Upwork Automation - Do Not Edit