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

Alphabetize order of shares in modal

Aaron Contreras2caf3d848ad1
diff --git a/app/components/work_packages/share/modal_body_component.rb b/app/components/work_packages/share/modal_body_component.rb
index c4e4d7051da..b9ee9b07e19 100644
--- a/app/components/work_packages/share/modal_body_component.rb
+++ b/app/components/work_packages/share/modal_body_component.rb
@@ -75,7 +75,7 @@ module WorkPackages
.having_entity_membership(@work_package)
.includes(work_package_shares: :roles)
.where(work_package_shares: { entity: @work_package })
- .order('work_package_shares.created_at DESC')
+ .ordered_by_name
end
end
end
diff --git a/app/controllers/work_packages/shares_controller.rb b/app/controllers/work_packages/shares_controller.rb
index 285a8496018..5c371851a48 100644
--- a/app/controllers/work_packages/shares_controller.rb
+++ b/app/controllers/work_packages/shares_controller.rb
@@ -134,6 +134,6 @@ class WorkPackages::SharesController < ApplicationController
.having_entity_membership(@work_package)
.includes(work_package_shares: :roles)
.where(work_package_shares: { entity: @work_package })
- .order('work_package_shares.created_at DESC')
+ .ordered_by_name
end
end