Skip to content

OpenProject is the leading open source project management software for product, project and portfolio management. A powerful Jira alternative with agile planning, issue tracking, roadmaps, Gantt charts, time tracking, collaboration features, and more. Available on premises or in the cloud. ⭐ Star us on GitHub

Remove default from position

Dombi Attila8b0bbbff2156
diff --git a/app/models/project/life_cycle_step.rb b/app/models/project/life_cycle_step.rb
index 90d4e74faff..dc317a69bc8 100644
--- a/app/models/project/life_cycle_step.rb
+++ b/app/models/project/life_cycle_step.rb
@@ -37,8 +37,6 @@ class Project::LifeCycleStep < ApplicationRecord
validates :type, inclusion: { in: %w[Project::Stage Project::Gate], message: :must_be_a_stage_or_gate }
- acts_as_list
-
def initialize(*args)
if instance_of? Project::LifeCycleStep
# Do not allow directly instantiating this class
diff --git a/db/migrate/20241030154245_create_project_life_cycle_step_definitions.rb b/db/migrate/20241030154245_create_project_life_cycle_step_definitions.rb
index a019e15c586..9be47cfe79c 100644
--- a/db/migrate/20241030154245_create_project_life_cycle_step_definitions.rb
+++ b/db/migrate/20241030154245_create_project_life_cycle_step_definitions.rb
@@ -31,7 +31,7 @@ class CreateProjectLifeCycleStepDefinitions < ActiveRecord::Migration[7.1]
create_table :project_life_cycle_step_definitions do |t|
t.string :type
t.string :name
- t.integer :position, default: 1, null: true
+ t.integer :position, null: true
t.references :color, foreign_key: true
t.timestamps
diff --git a/db/migrate/20241105151352_create_project_life_cycle_steps.rb b/db/migrate/20241105151352_create_project_life_cycle_steps.rb
index 3858a90d66e..cb4f7553b27 100644
--- a/db/migrate/20241105151352_create_project_life_cycle_steps.rb
+++ b/db/migrate/20241105151352_create_project_life_cycle_steps.rb
@@ -5,7 +5,6 @@ class CreateProjectLifeCycleSteps < ActiveRecord::Migration[7.1]
t.date :start_date
t.date :end_date
t.boolean :active, default: false, null: false
- t.integer :position, default: 1, null: true
t.references :project, foreign_key: true
t.references :definition, foreign_key: { to_table: :project_life_cycle_step_definitions }