Skip to content

Adds validation on project's organization

Bojan Marjanovic requested to merge bojan/project-organization-validation into master

What does this MR do and why?

As a part of the implementation steps of Project model should require organization (#443857), we're adding presence validation on Project#organization.

The next step would be to add a NOT NULL constraint on the projects.organization_id.

MR acceptance checklist

Please evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.

Screenshots or screen recordings

N/A

How to set up and validate locally

  1. Checkout the branch
  2. Open the Rails console
  3. Try to create a project without organization
  4. Verify that record is invalid without an organization
Edited by Bojan Marjanovic

Merge request reports