Skip to content

[HOLD for payment 2024-04-03] [Report Fields] [Onyx] Move policyReportFields_ key back into the policy_ key #36170

@flodnv

Description

@flodnv

Problem & Solution

Sister issue: #36171

Discussed internally, summarised here and concluded there

  • We added the onyx keys policyTaxRates_ and policyReportFields_ for no good reason. There's no size to optimize for in these collections.
  • This makes my life harder in trying to fix an architectural problem of sending policy updates in https://github.com/Expensify/Auth/pull/9773 (see https://expensify.slack.com/archives/C03TQ48KC/p1706285244529629 & [Backwards Compatibility] [HIGH] Push all policy updates to all policy members forever #34834)
  • This makes code more complex than it needs to be (lots of existing data massaging for really no gain)
  • As such, we should kill and fix this unnecessarily complex code that was recently introduced. This means, at a minimum (I might be missing things):
    • Moving this data back into the policy_ key
    • Removing any data massaging from the backend
    • Have the frontend accept the same data as what's in the database
    • Where we should not display disabled fields, then let's use the disabled property to hide them. We will need to display them to admins soon enough
  • No need to worry about sending updates to policy members when the policy changes, that will be done as part of https://github.com/Expensify/Auth/pull/9773, which includes doing this for all current and future policy attributes

cc @iwiznia @puneetlath @tgolen @marcaaron @francoisl @dangrous @johnmlee101 @MonilBhavsar

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~010e62ab2c798627fa
  • Upwork Job ID: 1755672881949298688
  • Last Price Increase: 2024-02-08

Metadata

Metadata

Labels

Awaiting PaymentAuto-added when associated PR is deployed to productionEngineeringInternalRequires API changes or must be handled by Expensify staffTaskWeeklyKSv2

Type

No type
No fields configured for issues without a type.

Projects

Status

Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions