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

Add `/projects/:project_id/boards/new` route

Aaron Contrerasc2502af924c9
diff --git a/modules/boards/config/routes.rb b/modules/boards/config/routes.rb
index ae4f99ab6e2..1985729da31 100644
--- a/modules/boards/config/routes.rb
+++ b/modules/boards/config/routes.rb
@@ -11,6 +11,11 @@ OpenProject::Application.routes.draw do
end
scope 'projects/:project_id', as: 'project' do
+ resources :boards,
+ controller: 'boards/boards',
+ only: %i[new],
+ as: :work_package_boards
+
get '/boards(/*state)', to: 'boards/boards#index', as: :work_package_boards
end
end
diff --git a/modules/boards/spec/routing/boards_routing_spec.rb b/modules/boards/spec/routing/boards_routing_spec.rb
index dc312e4fd48..a95ef54d3aa 100644
--- a/modules/boards/spec/routing/boards_routing_spec.rb
+++ b/modules/boards/spec/routing/boards_routing_spec.rb
@@ -47,6 +47,12 @@ RSpec.describe 'Boards routing' do
.to(controller: 'boards/boards', action: 'index', state: 'state')
end
+ it do
+ expect(subject)
+ .to route(:get, '/projects/foobar/boards/new')
+ .to(controller: 'boards/boards', action: 'new', project_id: 'foobar')
+ end
+
it do
expect(subject)
.to route(:get, '/boards/new')