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

[#66582] LDAP-Group-Sync: groups are not sorted in drop down https://community.openproject.org/work_packages/6 Fix drop down sorting

Tizian Rößlerbba86ec4e628
diff --git a/modules/ldap_groups/app/views/ldap_groups/synchronized_groups/new.html.erb b/modules/ldap_groups/app/views/ldap_groups/synchronized_groups/new.html.erb
index 950b61fc937..929a0d8fa06 100644
--- a/modules/ldap_groups/app/views/ldap_groups/synchronized_groups/new.html.erb
+++ b/modules/ldap_groups/app/views/ldap_groups/synchronized_groups/new.html.erb
@@ -54,7 +54,7 @@
<div class="form--field -required">
<%= f.select :group_id,
- Group.pluck(:lastname, :id),
+ Group.order(lastname: :asc).pluck(:lastname, :id),
required: true,
include_blank: "--- #{t(:actionview_instancetag_blank_option)} ---",
container_class: "-middle" %>