Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Prevent relationship fields from referencing single-type Content Types #767

Merged
merged 1 commit into from
Mar 28, 2019

Conversation

rmartz
Copy link
Contributor

@rmartz rmartz commented Mar 25, 2019

Overview

After encountering a UI issue in which a Relationship that referenced the Record Schema's primary Content Type was rendered incorrectly, it was decided that since each Record could have at most one single-type Content Type, a configuration in which another referenced that Content Type was not meaningful. Fixing the UI issue was deferred in favor of preventing such a configuration from being created.

Checklist

  • PR has a descriptive enough title to be useful in changelogs

Demo

Screen Shot 2019-03-25 at 1 02 17 PM

Notes

This does not add server-side validation, so invalid Record Schemas can be created by accessing the API directly. This appears to be a currently existing limitation, as we do not enforce other validation such as preventing Content Types from having a Relationship that points to themselves. #164873055 has been created to enforce these restrictions server-side.

Testing Instructions

  • Edit a Content Type on a Record Schema
  • Add a Relationship field, and attempt to point it to a single-type Content Type like "Incident Details"
    • Such Content Types should not be listed

Closes #164801173

@rmartz rmartz changed the title [WIP] Prevent relationship fields from referencing single-type Content Types Prevent relationship fields from referencing single-type Content Types Mar 25, 2019
@rmartz rmartz requested a review from pcaisse March 25, 2019 18:33
@rmartz rmartz merged commit 44c939d into develop Mar 28, 2019
@rmartz rmartz deleted the feature/prevent-rel-to-single branch March 28, 2019 17:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants