diff --git a/frappe/public/js/frappe/ui/group_by/group_by.js b/frappe/public/js/frappe/ui/group_by/group_by.js index f48aba1b7f..0430915782 100644 --- a/frappe/public/js/frappe/ui/group_by/group_by.js +++ b/frappe/public/js/frappe/ui/group_by/group_by.js @@ -367,7 +367,9 @@ frappe.ui.GroupBy = class { ["Select", "Link", "Data", "Int", "Check"].includes(f.fieldtype) ); const tag_field = { fieldname: "_user_tags", fieldtype: "Data", label: __("Tags") }; - this.group_by_fields[this.doctype] = fields.concat(tag_field); + this.group_by_fields[this.doctype] = fields + .concat(tag_field) + .sort((a, b) => __(a.label).localeCompare(__(b.label))); this.all_fields[this.doctype] = this.report_view.meta.fields; const standard_fields_filter = (df) => @@ -379,7 +381,8 @@ frappe.ui.GroupBy = class { const cdt = df.options; const child_table_fields = frappe.meta .get_docfields(cdt) - .filter(standard_fields_filter); + .filter(standard_fields_filter) + .sort((a, b) => __(a.label).localeCompare(__(b.label))); this.group_by_fields[cdt] = child_table_fields; this.all_fields[cdt] = child_table_fields; });