Skip to content

Segment rule ordering is not persisted #5669

@khvn26

Description

@khvn26

We have no way to explicitly provide segment rule order to the API when creating/updating them, nor any ordering defined when selecting them.

We should:

  1. Add a numeric Rule.priority model field
  2. Expose it in the API in a backwards-compatible way:
  • Add default ordering = ["priority"] model setting
  • Assume condition ids as priority values if no explicit "priority" keys offered in the mutating API requests.

I don't yet know how to reliably assume default values for the new field in a migration. We should test with current data/queries to come up with a path forward.

Metadata

Metadata

Assignees

No one assigned

    Labels

    apiIssue related to the REST APIbugSomething isn't working

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions