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

choose a better name for error message shown for lack of permission for selecting a child

Behrokh Satarnejada8fa6e69e157
diff --git a/app/controllers/work_package_children_relations_controller.rb b/app/controllers/work_package_children_relations_controller.rb
index ff972e35330..603ca0abbc7 100644
--- a/app/controllers/work_package_children_relations_controller.rb
+++ b/app/controllers/work_package_children_relations_controller.rb
@@ -82,7 +82,7 @@ class WorkPackageChildrenRelationsController < ApplicationController
WorkPackages::UpdateService.new(user: current_user, model: child)
.call(parent:)
else
- child.errors.add(:id, :lack_of_permission)
+ child.errors.add(:id, :cannot_add_child_because_of_lack_of_permission)
ServiceResult.failure(result: child)
end
end
diff --git a/config/locales/en.yml b/config/locales/en.yml
index a6e311866d0..94e231fdd73 100644
--- a/config/locales/en.yml
+++ b/config/locales/en.yml
@@ -1364,7 +1364,7 @@ en:
attributes:
id:
format: "%{message}"
- lack_of_permission: "Cannot add child because you don't have permissions to edit the selected work package."
+ cannot_add_child_because_of_lack_of_permission: "Cannot add child because you don't have permissions to edit the selected work package."
blank: "ID can't be blank."
assigned_to:
format: "%{message}"