Skip to content

Commit

Permalink
Seed new timeline query (opf#5346)
Browse files Browse the repository at this point in the history
And disable the old timeline module by default

[ci skip]
  • Loading branch information
oliverguenther committed Apr 10, 2017
1 parent 537df33 commit bbdd3b2
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 11 deletions.
20 changes: 11 additions & 9 deletions app/seeders/demo_data/project_seeder.rb
Original file line number Diff line number Diff line change
Expand Up @@ -95,15 +95,17 @@ def set_members(project)
end

def seed_timeline(project)
timeline = Timeline.create!(
project: project,
name: I18n.t('seeders.demo_data.timeline.name'),
options: {
'zoom_factor' => ['3'],
'initial_outline_expansion' => ['2'],
'columns' => [:start_date, :due_date, :status]
}
)
query = Query.create! project: project,
filters: [status_id: { operator: "o" }],
name: 'Timeline',
user_id: User.admin.first.id,
is_public: true,
timeline_visible: true,
column_names: [:subject, :type, :status]

MenuItems::QueryMenuItem.create! navigatable_id: query.id,
name: SecureRandom.uuid,
title: query.name
end

def seed_versions(project)
Expand Down
1 change: 0 additions & 1 deletion config/settings.yml
Original file line number Diff line number Diff line change
Expand Up @@ -263,7 +263,6 @@ default_projects_modules:
- work_package_tracking
- news
- time_tracking
- timelines
- wiki
# Role given to a non-admin user who creates a project
new_project_user_role_id:
Expand Down
2 changes: 1 addition & 1 deletion spec/seeders/demo_data_seeder_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
expect(Project.count).to eq 1
expect(WorkPackage.count).to eq 7
expect(Wiki.count).to eq 0
expect(Query.count).to eq 5
expect(Query.count).to eq 6
ensure
ActionMailer::Base.perform_deliveries = perform_deliveries
end
Expand Down

0 comments on commit bbdd3b2

Please sign in to comment.