diff --git a/db/migrate/20130917131710_planning_element_data_to_work_packages.rb b/db/migrate/20130917131710_planning_element_data_to_work_packages.rb index cd041d5e61..c9d1d9aa1a 100644 --- a/db/migrate/20130917131710_planning_element_data_to_work_packages.rb +++ b/db/migrate/20130917131710_planning_element_data_to_work_packages.rb @@ -78,7 +78,8 @@ class PlanningElementDataToWorkPackages < ActiveRecord::Migration default_status = select_one <<-SQL SELECT id FROM #{db_statuses_table} - WHERE position = 1 + WHERE is_default = true OR position = 1 + ORDER BY is_default DESC LIMIT 1 SQL diff --git a/doc/CHANGELOG.md b/doc/CHANGELOG.md index eb46eabec6..fdb1f0e7e5 100644 --- a/doc/CHANGELOG.md +++ b/doc/CHANGELOG.md @@ -36,6 +36,7 @@ See doc/COPYRIGHT.rdoc for more details. * `#3061` [Timelines] When the anonymous user does not have the right to view a reporting but tries to see a timeline w/ reportings, the error message is wrong * `#3068` Fix: [Migration] Automatic update text references to planning elements not migrated * `#3075` Fix: [Work Package Tracking] Save takes too long with many ancestors +* `#3110` Fix: [Migration] Default status not set to right status on planning element migration * Fix timezone migration for MySQL with custom timezone * Timeline performance improvements.