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

Fix selection of project modules

Oliver Günther47e8e7eb354d
diff --git a/app/views/projects/settings/modules/_form.html.erb b/app/views/projects/settings/modules/_form.html.erb
index 813a3f6d278..c975ca83ff9 100644
--- a/app/views/projects/settings/modules/_form.html.erb
+++ b/app/views/projects/settings/modules/_form.html.erb
@@ -31,7 +31,7 @@ See COPYRIGHT and LICENSE files for more details.
<% sorted_modules.each do |name| %>
<div class="form--field">
- <label class="form--label">
+ <label class="form--label" for="project_enabled_module_names_<%= name %>">
<%= l_or_humanize(name, prefix: "project_module_") %>
<% if !EnterpriseToken.active? && OpenProject::AccessControl.module_enterprise_feature?(name) %>
<%= spot_icon('enterprise-addons',
diff --git a/spec/features/projects/modules_spec.rb b/spec/features/projects/modules_spec.rb
index d46a8137f60..463662b3d00 100644
--- a/spec/features/projects/modules_spec.rb
+++ b/spec/features/projects/modules_spec.rb
@@ -81,10 +81,10 @@ RSpec.describe 'Projects module administration' do
expect(page)
.to have_selector '.op-toast.-error',
text: I18n.t(:'activerecord.errors.models.project.attributes.enabled_modules.dependency_missing',
- dependency: 'Work package tracking',
- module: 'Calendar')
+ dependency: 'Work packages',
+ module: 'Calendars')
- check 'Work package tracking'
+ check 'Work packages'
click_button 'Save'
@@ -94,10 +94,10 @@ RSpec.describe 'Projects module administration' do
.to have_checked_field 'Activity'
expect(page)
- .to have_checked_field 'Calendar'
+ .to have_checked_field 'Calendars'
expect(page)
- .to have_checked_field 'Work package tracking'
+ .to have_checked_field 'Work packages'
end
context 'with a user who does not have the correct permissions (#38097)' do