Merge branches 'feature/planning-element-type-migration' and 'feature/better-defaults' into feature/merge_planning_element_type_with_type

pull/1203/head
Martin Czuchra 11 years ago
commit f946d2d48c
  1. 2
      config/locales/de.yml
  2. 2
      config/locales/en.yml
  3. 15
      config/settings.yml
  4. 17
      db/migrate/20130729114110_move_planning_element_types_to_legacy_planning_element_types.rb
  5. 2
      doc/CHANGELOG.md
  6. 54
      lib/redmine/default_data/loader.rb
  7. 3
      lib/tasks/load_default_data.rake

@ -421,6 +421,8 @@ de:
default_type_bug: "Fehler"
default_type_feature: "Feature"
default_type_support: "Unterstützung"
default_type_phase: "Phase"
default_type_milestone: "Meilenstein"
description_active: "Aktiv?"
description_attachment_toggle: "Dateien aus/einblenden"

@ -425,6 +425,8 @@ en:
default_type_bug: "Bug"
default_type_feature: "Feature"
default_type_support: "Support"
default_type_phase: "Phase"
default_type_milestone: "Milestone"
description_active: "Active?"
description_attachment_toggle: "Show/Hide attachments"

@ -48,7 +48,7 @@ activity_days_default:
format: int
default: 30
per_page_options:
default: '25,50,100'
default: '100, 500, 1000'
mail_from:
default: openproject@example.net
bcc_recipients:
@ -155,15 +155,16 @@ default_projects_public:
default_projects_modules:
serialized: true
default:
- issue_tracking
- time_tracking
- news
- boards
- calendar
- documents
- files
- wiki
- issue_tracking
- news
- repository
- boards
- calendar
- time_tracking
- timelines
- wiki
# Role given to a non-admin user who creates a project
new_project_user_role_id:
format: int

@ -0,0 +1,17 @@
class MovePlanningElementTypesToLegacyPlanningElementTypes < ActiveRecord::Migration
def up
rename_table :default_planning_element_types, :legacy_default_planning_element_types
rename_table :enabled_planning_element_types, :legacy_enabled_planning_element_types
rename_table :planning_element_types, :legacy_planning_element_types
remove_column :work_packages, :planning_element_type_id
end
def down
rename_table :legacy_default_planning_element_types, :default_planning_element_types
rename_table :legacy_enabled_planning_element_types, :enabled_planning_element_types
rename_table :legacy_planning_element_types, :planning_element_types
add_column :work_packages, :planning_element_type_id, :integer
end
end

@ -1,5 +1,7 @@
# Changelog
* `#1437` Update seed data
## 3.0.0pre9
* `#1517` Journal changed_data cannot contain the changes of a wiki_content content

@ -114,14 +114,58 @@ module Redmine
:browse_repository,
:view_changesets]
# Colors
colors_list = PlanningElementTypeColor.ms_project_colors
colors = Hash[*(colors_list.map do |color|
color.save
color.reload
[color.name.to_sym, color.id]
end).flatten]
# Types
Type.create!(:name => l(:default_type_bug), :is_in_chlog => true, :is_in_roadmap => false, :position => 1)
Type.create!(:name => l(:default_type_feature), :is_in_chlog => true, :is_in_roadmap => true, :position => 2)
Type.create!(:name => l(:default_type_support), :is_in_chlog => false, :is_in_roadmap => false, :position => 3)
Type.create! :name => l(:default_type_bug),
:color_id => colors[:pjRed],
:is_in_chlog => true,
:is_in_roadmap => false,
:in_aggregation => true,
:is_milestone => false,
:position => 1
Type.create! :name => l(:default_type_feature),
:color_id => colors[:pjLime],
:is_in_chlog => true,
:is_in_roadmap => true,
:in_aggregation => true,
:is_milestone => false,
:position => 2
Type.create! :name => l(:default_type_support),
:color_id => colors[:pjBlue],
:is_in_chlog => false,
:is_in_roadmap => false,
:in_aggregation => true,
:is_milestone => false,
:position => 3
Type.create! :name => l(:default_type_phase),
:color_id => colors[:pjSilver],
:is_in_chlog => false,
:is_in_roadmap => false,
:in_aggregation => true,
:is_milestone => false,
:position => 4
Type.create! :name => l(:default_type_milestone),
:color_id => colors[:pjPurple],
:is_in_chlog => false,
:is_in_roadmap => true,
:in_aggregation => true,
:is_milestone => true,
:position => 5
# Issue statuses
new = IssueStatus.create!(:name => l(:default_issue_status_new), :is_closed => false, :is_default => true, :position => 1)
in_progress = IssueStatus.create!(:name => l(:default_issue_status_in_progress), :is_closed => false, :is_default => false, :position => 2)
new = IssueStatus.create!(:name => l(:default_issue_status_new), :is_closed => false, :is_default => true, :position => 1)
in_progress = IssueStatus.create!(:name => l(:default_issue_status_in_progress), :is_closed => false, :is_default => false, :position => 3)
resolved = IssueStatus.create!(:name => l(:default_issue_status_resolved), :is_closed => false, :is_default => false, :position => 3)
feedback = IssueStatus.create!(:name => l(:default_issue_status_feedback), :is_closed => false, :is_default => false, :position => 4)
closed = IssueStatus.create!(:name => l(:default_issue_status_closed), :is_closed => true, :is_default => false, :position => 5)

@ -40,7 +40,8 @@ namespace :redmine do
rescue Redmine::DefaultData::DataAlreadyLoaded => error
puts error
rescue => error
puts "Error: " + error
puts "Error: " + error.message
puts error.backtrace.join("\n")
puts "Default configuration data was not loaded."
end
end

Loading…
Cancel
Save