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
Ruby agile-developmentangularbcfboardsbug-trackerganttgantt-chartifcissue-trackerjira-alternativekanbanopenprojectproduct-managementproject-managementproject-planningroadmaprubyscrumtimelineworkflows
[#65513] Form configuration page is broken on the work packages page
Dombi Attila0e66e4b0f5c9
diff --git a/app/views/custom_fields/_tab.html.erb b/app/views/custom_fields/_tab.html.erbindex 89fe2f80b63..999971035b5 100644--- a/app/views/custom_fields/_tab.html.erb+++ b/app/views/custom_fields/_tab.html.erb@@ -144,7 +144,7 @@ See COPYRIGHT and LICENSE files for more details.<%= t(:label_x_projects, count: custom_field.projects.count) %></td><% end %><td>- <% type_links = custom_field.types.map { |t| link_to(t.name, edit_tab_type_path(id: t.id, tab: "form_configuration")) } %>+ <% type_links = custom_field.types.map { |t| link_to(t.name, edit_type_form_configuration_path(t)) } %><% if type_links.empty? %><span class="icon-context icon-warning"><%= link_to t(:label_custom_field_add_no_type), types_path %>diff --git a/lib/api/v3/work_packages/create_form_representer.rb b/lib/api/v3/work_packages/create_form_representer.rbindex d0f201b70da..62ef51ca3de 100644--- a/lib/api/v3/work_packages/create_form_representer.rb+++ b/lib/api/v3/work_packages/create_form_representer.rb@@ -78,7 +78,7 @@ module APIrepresented.type_id &&represented.type_id != 0{- href: edit_type_path(represented.type_id, tab: "form_configuration"),+ href: edit_type_form_configuration_path(represented.type_id),type: "text/html",title: "Configure form"}diff --git a/lib/api/v3/work_packages/create_project_form_representer.rb b/lib/api/v3/work_packages/create_project_form_representer.rbindex fe1ee711b5a..76fea02105f 100644--- a/lib/api/v3/work_packages/create_project_form_representer.rb+++ b/lib/api/v3/work_packages/create_project_form_representer.rb@@ -76,8 +76,7 @@ module APIrepresented.type_id &&represented.type_id != 0{- href: edit_type_path(represented.type_id,- tab: "form_configuration"),+ href: edit_type_form_configuration_path(represented.type_id),type: "text/html",title: "Configure form"}diff --git a/lib/api/v3/work_packages/work_package_representer.rb b/lib/api/v3/work_packages/work_package_representer.rbindex e83c14ef98b..acf460e349e 100644--- a/lib/api/v3/work_packages/work_package_representer.rb+++ b/lib/api/v3/work_packages/work_package_representer.rb@@ -180,7 +180,7 @@ module APInext unless represented.type_id{- href: edit_type_path(represented.type_id, tab: "form_configuration"),+ href: edit_type_form_configuration_path(represented.type_id),type: "text/html",title: "Configure form"}diff --git a/spec/lib/api/v3/work_packages/create_form_representer_spec.rb b/spec/lib/api/v3/work_packages/create_form_representer_spec.rbindex a632cd72993..cf4faae4ae6 100644--- a/spec/lib/api/v3/work_packages/create_form_representer_spec.rb+++ b/spec/lib/api/v3/work_packages/create_form_representer_spec.rb@@ -191,7 +191,7 @@ RSpec.describe API::V3::WorkPackages::CreateFormRepresenter doit "has a link to configure the form" doexpected = {- href: "/types/#{type.id}/edit?tab=form_configuration",+ href: edit_type_form_configuration_path(type),type: "text/html",title: "Configure form"}diff --git a/spec/lib/api/v3/work_packages/create_project_form_representer_spec.rb b/spec/lib/api/v3/work_packages/create_project_form_representer_spec.rbindex 365413be55e..8120f0c08b6 100644--- a/spec/lib/api/v3/work_packages/create_project_form_representer_spec.rb+++ b/spec/lib/api/v3/work_packages/create_project_form_representer_spec.rb@@ -163,7 +163,7 @@ RSpec.describe API::V3::WorkPackages::CreateProjectFormRepresenter doit "has a link to configure the form" doexpected = {- href: "/types/#{type.id}/edit?tab=form_configuration",+ href: edit_type_form_configuration_path(type),type: "text/html",title: "Configure form"}diff --git a/spec/lib/api/v3/work_packages/work_package_representer_spec.rb b/spec/lib/api/v3/work_packages/work_package_representer_spec.rbindex f5c282e0827..cfd60f46e64 100644--- a/spec/lib/api/v3/work_packages/work_package_representer_spec.rb+++ b/spec/lib/api/v3/work_packages/work_package_representer_spec.rb@@ -1246,7 +1246,7 @@ RSpec.describe API::V3::WorkPackages::WorkPackageRepresenter doit_behaves_like "has a titled link" dolet(:link) { "configureForm" }- let(:href) { edit_type_path(work_package.type_id, tab: "form_configuration") }+ let(:href) { edit_type_form_configuration_path(work_package.type_id) }let(:title) { "Configure form" }endend