Project

General

Profile

Defect #31132 » 0001-Remove-unused-column-trackers.is_in_chlog-31132.patch

Marius BĂLTEANU, 2021-07-04 17:30

View differences:

db/migrate/20210704131544_drop_is_in_chlog_column.rb
1
class DropIsInChlogColumn < ActiveRecord::Migration[6.1]
2
  def self.up
3
    remove_column :trackers, :is_in_chlog
4
  end
5

  
6
  def self.down
7
    raise IrreversibleMigration
8
  end
9
end
lib/redmine/default_data/loader.rb
155 155
            rejected  = IssueStatus.create!(:name => l(:default_issue_status_rejected), :is_closed => true, :position => 6)
156 156

  
157 157
            # Trackers
158
            bug = Tracker.create!(:name => l(:default_tracker_bug), :default_status_id => new.id, :is_in_chlog => true, :is_in_roadmap => false, :position => 1)
159
            feature = Tracker.create!(:name => l(:default_tracker_feature), :default_status_id => new.id, :is_in_chlog => true, :is_in_roadmap => true, :position => 2)
160
            support = Tracker.create!(:name => l(:default_tracker_support), :default_status_id => new.id, :is_in_chlog => false, :is_in_roadmap => false, :position => 3)
158
            bug = Tracker.create!(:name => l(:default_tracker_bug), :default_status_id => new.id, :is_in_roadmap => false, :position => 1)
159
            feature = Tracker.create!(:name => l(:default_tracker_feature), :default_status_id => new.id, :is_in_roadmap => true, :position => 2)
160
            support = Tracker.create!(:name => l(:default_tracker_support), :default_status_id => new.id, :is_in_roadmap => false, :position => 3)
161 161

  
162 162
            # Set trackers as defaults for new projects
163 163
            Setting.default_projects_tracker_ids = [
test/fixtures/trackers.yml
1
--- 
2
trackers_001: 
1
---
2
trackers_001:
3 3
  name: Bug
4 4
  id: 1
5
  is_in_chlog: true
6 5
  default_status_id: 1
7 6
  position: 1
8 7
  description: Description for Bug tracker
9
trackers_002: 
8
trackers_002:
10 9
  name: Feature request
11 10
  id: 2
12
  is_in_chlog: true
13 11
  default_status_id: 1
14 12
  position: 2
15 13
  description: Description for Feature request tracker
16
trackers_003: 
14
trackers_003:
17 15
  name: Support request
18 16
  id: 3
19
  is_in_chlog: false
20 17
  default_status_id: 1
21 18
  position: 3
    (1-1/1)