Commit 3c56758b authored by Stan Hu's avatar Stan Hu

Merge branch '31868-make-name-optional-parameter-of-release-entity' into 'master'

Resolve "Make `name` optional parameter of Release entity"

Closes #31868

See merge request !16647
parents af503628 96a53e4f
Pipeline #83046288 failed with stages
in 10 minutes and 16 seconds
......@@ -22,7 +22,6 @@ class Release < ApplicationRecord
accepts_nested_attributes_for :links, allow_destroy: true
validates :description, :project, :tag, presence: true
validates :name, presence: true, on: :create
validates_associated :milestone_releases, message: -> (_, obj) { obj[:value].map(&:errors).map(&:full_messages).join(",") }
scope :sorted, -> { order(released_at: :desc) }
title: Make name an optional parameter of releases
merge_request: 16647
type: changed
......@@ -20,7 +20,6 @@ RSpec.describe Release do
describe 'validation' do
it { validate_presence_of(:project) }
it { validate_presence_of(:description) }
it { validate_presence_of(:name) }
context 'when a release exists in the database without a name' do
it 'does not require name' do
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment