Skip to content

*_one_of constraints in collections #540

Description

@vkrasnovyd

In the collection files it should be possible to define a list of fields, that will be checked together in the model-level constraint triggers. Depending on the trigger type, error should be raised if:

  • maximum_one_of: More than one of the fields from the list is selected. Example:
    • motion: [lead_motion_id, diff_version]
  • minimum_one_of: None of the fields from the list is selected. Example:
    • personal_note: [star, note]
  • exactly_one_of: None or more than one of the fields from the list is selected. Examples:
    • poll_option: [meeting_user_id, text]
    • meeting_poll_default: [used_as_assignment_poll_config_in_meeting_id, used_as_motion_poll_config_in_meeting_id, used_as_topic_poll_config_in_meeting_id] (Note: these are view fields).

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementGeneral enhancement which is neither bug nor feature

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions