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 - closed), we're adding presence validation on Project#organization.

The next step would be to rollout [Feature flag] Rollout of `require_organization` (#470839) and 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.

How to set up and validate locally

  1. Checkout the branch
  2. Open the Rails console and enable the feature flag: Feature.enable(:require_organization)
  3. Try to create a project without organization
  4. Verify that record is invalid without an organization
Edited by Abdul Wadood

Merge request reports